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

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

    Signature
    (!tlb-key->vpn vpn x) → new-x
    Arguments
    vpn — Guard (36bits-p vpn).
    x — Guard (tlb-key-p x).
    Returns
    new-x — Type (tlb-key-p new-x).

    Definitions and Theorems

    Function: !tlb-key->vpn$inline

    (defun !tlb-key->vpn$inline (vpn x)
     (declare (xargs :guard (and (36bits-p vpn) (tlb-key-p x))))
     (mbe
      :logic
      (b* ((vpn (mbe :logic (36bits-fix vpn) :exec vpn))
           (x (tlb-key-fix x)))
        (part-install vpn x :width 36 :low 10))
      :exec
      (the (unsigned-byte 46)
           (logior (the (unsigned-byte 46)
                        (logand (the (unsigned-byte 46) x)
                                (the (signed-byte 47) -70368744176641)))
                   (the (unsigned-byte 46)
                        (ash (the (unsigned-byte 36) vpn)
                             10))))))

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

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

    Theorem: !tlb-key->vpn$inline-of-36bits-fix-vpn

    (defthm !tlb-key->vpn$inline-of-36bits-fix-vpn
      (equal (!tlb-key->vpn$inline (36bits-fix vpn)
                                   x)
             (!tlb-key->vpn$inline vpn x)))

    Theorem: !tlb-key->vpn$inline-36bits-equiv-congruence-on-vpn

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

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

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

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

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

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

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

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

    (defthm tlb-key->vpn-of-!tlb-key->vpn
      (b* ((?new-x (!tlb-key->vpn$inline vpn x)))
        (equal (tlb-key->vpn new-x)
               (36bits-fix vpn))))

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

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