• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
      • 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
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Tlb-key

    !tlb-key->ac

    Update the |X86ISA|::|AC| field of a tlb-key bit structure.

    Signature
    (!tlb-key->ac ac x) → new-x
    Arguments
    ac — Guard (bitp ac).
    x — Guard (tlb-key-p x).
    Returns
    new-x — Type (tlb-key-p new-x).

    Definitions and Theorems

    Function: !tlb-key->ac$inline

    (defun !tlb-key->ac$inline (ac x)
     (declare (xargs :guard (and (bitp ac) (tlb-key-p x))))
     (mbe
         :logic
         (b* ((ac (mbe :logic (bfix ac) :exec ac))
              (x (tlb-key-fix x)))
           (part-install ac x :width 1 :low 3))
         :exec (the (unsigned-byte 46)
                    (logior (the (unsigned-byte 46)
                                 (logand (the (unsigned-byte 46) x)
                                         (the (signed-byte 5) -9)))
                            (the (unsigned-byte 4)
                                 (ash (the (unsigned-byte 1) ac) 3))))))

    Theorem: tlb-key-p-of-!tlb-key->ac

    (defthm tlb-key-p-of-!tlb-key->ac
      (b* ((new-x (!tlb-key->ac$inline ac x)))
        (tlb-key-p new-x))
      :rule-classes :rewrite)

    Theorem: !tlb-key->ac$inline-of-bfix-ac

    (defthm !tlb-key->ac$inline-of-bfix-ac
      (equal (!tlb-key->ac$inline (bfix ac) x)
             (!tlb-key->ac$inline ac x)))

    Theorem: !tlb-key->ac$inline-bit-equiv-congruence-on-ac

    (defthm !tlb-key->ac$inline-bit-equiv-congruence-on-ac
      (implies (bit-equiv ac ac-equiv)
               (equal (!tlb-key->ac$inline ac x)
                      (!tlb-key->ac$inline ac-equiv x)))
      :rule-classes :congruence)

    Theorem: !tlb-key->ac$inline-of-tlb-key-fix-x

    (defthm !tlb-key->ac$inline-of-tlb-key-fix-x
      (equal (!tlb-key->ac$inline ac (tlb-key-fix x))
             (!tlb-key->ac$inline ac x)))

    Theorem: !tlb-key->ac$inline-tlb-key-equiv-congruence-on-x

    (defthm !tlb-key->ac$inline-tlb-key-equiv-congruence-on-x
      (implies (tlb-key-equiv x x-equiv)
               (equal (!tlb-key->ac$inline ac x)
                      (!tlb-key->ac$inline ac x-equiv)))
      :rule-classes :congruence)

    Theorem: !tlb-key->ac-is-tlb-key

    (defthm !tlb-key->ac-is-tlb-key
      (equal (!tlb-key->ac ac x)
             (change-tlb-key x :ac ac)))

    Theorem: tlb-key->ac-of-!tlb-key->ac

    (defthm tlb-key->ac-of-!tlb-key->ac
      (b* ((?new-x (!tlb-key->ac$inline ac x)))
        (equal (tlb-key->ac new-x) (bfix ac))))

    Theorem: !tlb-key->ac-equiv-under-mask

    (defthm !tlb-key->ac-equiv-under-mask
      (b* ((?new-x (!tlb-key->ac$inline ac x)))
        (tlb-key-equiv-under-mask new-x x -9)))