• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • C
      • Proof-checker-array
      • Soft
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Ethereum
      • Leftist-trees
      • Java
      • Riscv
      • Taspi
      • Bitcoin
      • Zcash
      • Des
      • 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
        • Sha-2
        • Yul
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Axe
        • Poseidon
        • Where-do-i-place-my-book
        • Aleo
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Community
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Tlb-key

    Good-tlb-key-p

    Recongnizer for a valid TLB key.

    Signature
    (good-tlb-key-p key) → *

    The defbitstruct book generates a tlb-key-p recongnizer, but that allows a tlb-key to have r-w-x to be set to 3, since it is a 2 bit field, but we only want to allow it to be 0-2 because we only have three kinds of accesses, read/write/execute. good-tlb-key-p recongizes a tlb-key-p which has the r-w-x field less than or equal to 2. All keys in the TLB are good-tlb-key-p.

    Definitions and Theorems

    Function: good-tlb-key-p

    (defun good-tlb-key-p (key)
      (declare (xargs :guard t))
      (let ((__function__ 'good-tlb-key-p))
        (declare (ignorable __function__))
        (and (tlb-key-p key)
             (<= (tlb-key->r-w-x key) 2))))