• 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
          • 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
  • Riscv

Executable

Executable refinement of the RISC-V specification.

The specification is aimed at clarity, and not at efficient execution. In fact, since decoding is specified as inverse of encoding, the specification is not fully executable. Here we provide an executable refinement of the specification. In particular, we define an executable decoding function decodex and we prove it equivalent to the declaratively defined decode.

In the future, we may investigate synthesizing the executable decoder using APT.

We use apt::simplify to obtain executable versions of step and stepn, which call decodex instead of decode.

The semnantic functions do not depend on decoding and thus do not need to be refined to be fully executable.

Subtopics

Decoding-left-inverse
Executable decoding applied to encoding.
Decoding-executable
Executable decoding of instructions.
Decoding-right-inverse
Encoding applied to the executable decoding.
Execution-executable
Executable refinements of the execution functions.
Decoding-correct
Correctness of the executable decoding.