• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Bitcoin
      • Riscv
        • Instructions
        • States
        • Decoding
        • Encoding
        • Features
          • Feat-bits
          • Feat
          • Feat->xnum
          • Feat->xlen
            • Feat-64p
            • Feat-32p
          • Semantics
          • Execution
        • 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
        • Bigmems
        • Builtins
        • Execloader
        • Aleo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Features

    Feat->xlen

    The XLEN parameter [ISA:1.3].

    Signature
    (feat->xlen feat) → xlen
    Arguments
    feat — Guard (featp feat).
    Returns
    xlen — Type (posp xlen).

    This is the register width, depending on the choice of base.

    Definitions and Theorems

    Function: feat->xlen

    (defun feat->xlen (feat)
      (declare (xargs :guard (featp feat)))
      (let ((__function__ 'feat->xlen))
        (declare (ignorable __function__))
        (b* (((feat feat) feat))
          (feat-bits-case feat.bits
                          :|32| 32
                          :|64| 64))))

    Theorem: posp-of-feat->xlen

    (defthm posp-of-feat->xlen
      (b* ((xlen (feat->xlen feat)))
        (posp xlen))
      :rule-classes (:rewrite :type-prescription))

    Theorem: feat->xlen-when-32-bits

    (defthm feat->xlen-when-32-bits
      (implies (feat-32p feat)
               (b* ((?xlen (feat->xlen feat)))
                 (equal xlen 32))))

    Theorem: feat->xlen-when-64-bits

    (defthm feat->xlen-when-64-bits
      (implies (feat-64p feat)
               (b* ((?xlen (feat->xlen feat)))
                 (equal xlen 64))))

    Theorem: feat->xlen-of-feat-fix-feat

    (defthm feat->xlen-of-feat-fix-feat
      (equal (feat->xlen (feat-fix feat))
             (feat->xlen feat)))

    Theorem: feat->xlen-feat-equiv-congruence-on-feat

    (defthm feat->xlen-feat-equiv-congruence-on-feat
      (implies (feat-equiv feat feat-equiv)
               (equal (feat->xlen feat)
                      (feat->xlen feat-equiv)))
      :rule-classes :congruence)