• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Debugging
    • Projects
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
      • X86isa
        • Program-execution
        • Introduction
        • X86isa-build-instructions
        • Publications
        • Contributors
        • Machine
          • Syscalls
          • Cpuid
          • X86isa-state
          • Linear-memory
          • Rflag-specifications
          • Characterizing-undefined-behavior
          • Top-level-memory
          • App-view
            • Linear-memory-in-app-view
              • Rvm32
              • Rvm128
              • Canonical-address-p
              • Wvm32
              • Rvm80
              • Rvm64
              • Rvm48
              • Wvm80
              • Wvm64
              • Wvm48
              • Wvm128
              • Rvm16
              • Wvm16
              • Rvm08
                • Wvm08
            • X86-decoder
            • Physical-memory
            • Decoding-and-spec-utils
            • Instructions
            • X86-modes
            • Segmentation
            • Register-readers-and-writers
            • Other-non-deterministic-computations
            • Environment
            • Paging
          • Implemented-opcodes
          • Proof-utilities
          • To-do
          • Concrete-simulation-examples
          • Model-validation
          • Utils
          • Debugging-code-proofs
        • Execloader
        • Axe
      • Testing-utilities
      • Math
    • Linear-memory-in-app-view

    Rvm08

    Signature
    (rvm08 addr x86) → (mv * * x86)

    Definitions and Theorems

    Function: rvm08$inline

    (defun rvm08$inline (addr x86)
           (declare (xargs :stobjs (x86)))
           (declare (type (signed-byte 48) addr))
           (mbe :logic (if (canonical-address-p addr)
                           (mv nil (memi (n48 addr) x86) x86)
                           (mv 'rvm08 0 x86))
                :exec (mv nil (memi (n48 addr) x86) x86)))

    Theorem: rvm08-no-error

    (defthm rvm08-no-error
            (implies (canonical-address-p addr)
                     (equal (mv-nth 0 (rvm08 addr x86))
                            nil)))

    Theorem: n08p-mv-nth-1-rvm08

    (defthm
     n08p-mv-nth-1-rvm08
     (unsigned-byte-p 8 (mv-nth 1 (rvm08 addr x86)))
     :rule-classes
     (:rewrite
      (:type-prescription
          :corollary (natp (mv-nth 1 (rvm08 addr x86)))
          :hints
          (("Goal" :in-theory '(unsigned-byte-p integer-range-p natp))))
      (:linear
       :corollary (and (<= 0 (mv-nth 1 (rvm08 addr x86)))
                       (< (mv-nth 1 (rvm08 addr x86)) 256))
       :hints
       (("Goal"
            :in-theory '(unsigned-byte-p integer-range-p (:e expt)))))))

    Theorem: x86p-mv-nth-2-rvm08-unchanged

    (defthm x86p-mv-nth-2-rvm08-unchanged
            (equal (mv-nth 2 (rvm08 addr x86)) x86))

    Theorem: xr-rvm08

    (defthm xr-rvm08
            (equal (xr fld index (mv-nth 2 (rvm08 addr x86)))
                   (xr fld index x86)))

    Theorem: rvm08-xw-values

    (defthm
       rvm08-xw-values
       (implies
            (not (equal fld :mem))
            (and (equal (mv-nth 0 (rvm08 addr (xw fld index value x86)))
                        (mv-nth 0 (rvm08 addr x86)))
                 (equal (mv-nth 1 (rvm08 addr (xw fld index value x86)))
                        (mv-nth 1 (rvm08 addr x86))))))