• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Fgl
      • Vwsim
      • Vl
      • X86isa
        • Program-execution
        • Sdm-instruction-set-summary
        • Tlb
          • Tlb-key
            • !tlb-key->implicit-supervisor-access
            • Tlb-key-fast
            • Tlb-key-p
            • !tlb-key->r-w-x
            • !tlb-key->vpn
            • !tlb-key->smep
            • !tlb-key->smap
            • !tlb-key->cpl
            • !tlb-key->nxe
            • Tlb-key->implicit-supervisor-access
            • !tlb-key->wp
            • !tlb-key->ac
            • Tlb-key->vpn
            • Tlb-key->smep
            • Tlb-key->smap
            • Tlb-key->r-w-x
            • Tlb-key->cpl
            • Tlb-key-fix
              • Tlb-key->wp
              • Tlb-key->nxe
              • Tlb-key->ac
              • Good-tlb-key-p
            • Tlbp
            • Tlb-entryp
          • Running-linux
          • Introduction
          • Asmtest
          • X86isa-build-instructions
          • Publications
          • Contributors
          • Machine
          • Implemented-opcodes
          • To-do
          • Proof-utilities
          • Peripherals
          • Model-validation
          • Modelcalls
          • Concrete-simulation-examples
          • Utils
          • Debugging-code-proofs
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Tlb-key

    Tlb-key-fix

    Fixing function for tlb-key bit structures.

    Signature
    (tlb-key-fix x) → fty::fixed
    Arguments
    x — Guard (tlb-key-p x).
    Returns
    fty::fixed — Type (tlb-key-p fty::fixed).

    Definitions and Theorems

    Function: tlb-key-fix

    (defun tlb-key-fix (x)
      (declare (xargs :guard (tlb-key-p x)))
      (let ((__function__ 'tlb-key-fix))
        (declare (ignorable __function__))
        (mbe :logic (loghead 46 x) :exec x)))

    Theorem: tlb-key-p-of-tlb-key-fix

    (defthm tlb-key-p-of-tlb-key-fix
      (b* ((fty::fixed (tlb-key-fix x)))
        (tlb-key-p fty::fixed))
      :rule-classes :rewrite)

    Theorem: tlb-key-fix-when-tlb-key-p

    (defthm tlb-key-fix-when-tlb-key-p
      (implies (tlb-key-p x)
               (equal (tlb-key-fix x) x)))

    Function: tlb-key-equiv$inline

    (defun tlb-key-equiv$inline (x y)
      (declare (xargs :guard (and (tlb-key-p x) (tlb-key-p y))))
      (equal (tlb-key-fix x) (tlb-key-fix y)))

    Theorem: tlb-key-equiv-is-an-equivalence

    (defthm tlb-key-equiv-is-an-equivalence
      (and (booleanp (tlb-key-equiv x y))
           (tlb-key-equiv x x)
           (implies (tlb-key-equiv x y)
                    (tlb-key-equiv y x))
           (implies (and (tlb-key-equiv x y)
                         (tlb-key-equiv y z))
                    (tlb-key-equiv x z)))
      :rule-classes (:equivalence))

    Theorem: tlb-key-equiv-implies-equal-tlb-key-fix-1

    (defthm tlb-key-equiv-implies-equal-tlb-key-fix-1
      (implies (tlb-key-equiv x x-equiv)
               (equal (tlb-key-fix x)
                      (tlb-key-fix x-equiv)))
      :rule-classes (:congruence))

    Theorem: tlb-key-fix-under-tlb-key-equiv

    (defthm tlb-key-fix-under-tlb-key-equiv
      (tlb-key-equiv (tlb-key-fix x) x)
      :rule-classes (:rewrite :rewrite-quoted-constant))