• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Pfcs
      • Wp-gen
      • Dimacs-reader
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Riscv
        • Specification
        • Executable
          • Decoding-left-inverse
            • Decodex-of-encode-of-instr
            • Get-opcode-of-encode-of-instr
            • Get-funct3-of-encode-of-instr
            • Get-rd-of-encode-of-instr
            • Get-rs1-of-encode-of-instr
            • Get-fields-itype-of-encode-of-instr
            • Get-imm-itype-of-encode-of-instr
            • Get-rs2-of-encode-of-instr
            • Get-fields-rtype-of-encode-of-instr
            • Encode-injective
            • Get-funct7-of-encode-of-instr
            • Get-fields-utype-of-encode-of-instr
            • Decodex-of-encode
            • Get-imm-utype-of-encode-of-instr
            • Get-fields-stype-of-encode-of-instr
            • Get-fields-btype-of-encode-of-instr
            • Get-imm-stype-of-encode-of-instr
            • Get-imm-jtype-of-encode-of-instr
            • Get-imm-btype-of-encode-of-instr
            • Get-fields-jtype-of-encode-of-instr
          • Decoding-executable
          • Decoding-right-inverse
          • Execution-executable
          • Decoding-correct
        • Specialized
      • Bitcoin
      • Des
      • Ethereum
      • X86isa
      • Sha-2
      • Yul
      • Zcash
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
      • Json
      • Jfkr
      • Equational
      • Cryptography
      • Poseidon
      • Where-do-i-place-my-book
      • Axe
      • Aleo
      • Bigmems
      • Builtins
      • Execloader
      • Solidity
      • Paco
      • Concurrent-programs
      • Bls12-377-curves
    • Debugging
    • Std
    • Community
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Math
    • Testing-utilities
  • Executable

Decoding-left-inverse

Executable decoding applied to encoding.

We show that the executable decoding is left inverse of encoding (i.e. that encoding is right inverse of the executable decoding) over valid instructions: encoding a valid instruction and then decoding it yields the original instruction. As a consequence, encoding is injective over valid instructions: if two different instructions were encoded in the same way, the decoder would have to restore both from the same encoding, which is impossible since decoding is a function.

Subtopics

Decodex-of-encode-of-instr
Theorems about decodex applied to the encoding of different instructions.
Get-opcode-of-encode-of-instr
Theorems about get-opcode applied to the encoding of different instructions.
Get-funct3-of-encode-of-instr
Theorems about get-funct3 applied to the encoding of different instructions.
Get-rd-of-encode-of-instr
Theorems about get-rd applied to the encoding of different instructions.
Get-rs1-of-encode-of-instr
Theorems about get-rs1 applied to the encoding of different instructions.
Get-fields-itype-of-encode-of-instr
Theorems about get-fields-itype applied to the encoding of different instructions.
Get-imm-itype-of-encode-of-instr
Theorems about get-imm-itype applied to the encoding of different instructions.
Get-rs2-of-encode-of-instr
Theorems about get-rs2 applied to the encoding of different instructions.
Get-fields-rtype-of-encode-of-instr
Theorems about get-fields-rtype applied to the encoding of different instructions.
Encode-injective
Injectivity of encoding.
Get-funct7-of-encode-of-instr
Theorems about get-funct7 applied to the encoding of different instructions.
Get-fields-utype-of-encode-of-instr
Theorems about get-fields-utype applied to the encoding of different instructions.
Decodex-of-encode
Decoding the encoding of a valid instruction yields the original instruction.
Get-imm-utype-of-encode-of-instr
Theorems about get-imm-utype applied to the encoding of different instructions.
Get-fields-stype-of-encode-of-instr
Theorems about get-fields-stype applied to the encoding of different instructions.
Get-fields-btype-of-encode-of-instr
Theorems about get-fields-btype applied to the encoding of different instructions.
Get-imm-stype-of-encode-of-instr
Theorems about get-imm-stype applied to the encoding of different instructions.
Get-imm-jtype-of-encode-of-instr
Theorems about get-imm-jtype applied to the encoding of different instructions.
Get-imm-btype-of-encode-of-instr
Theorems about get-imm-btype applied to the encoding of different instructions.
Get-fields-jtype-of-encode-of-instr
Theorems about get-fields-utype applied to the encoding of different instructions.