• 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
        • Running-linux
        • Introduction
        • Asmtest
        • X86isa-build-instructions
        • Publications
        • Contributors
        • Machine
          • X86isa-state
          • Syscalls
          • Cpuid
          • Linear-memory
            • Reasoning-about-memory-reads-and-writes
            • Wml256
            • Rml256
            • Wml512
            • Rml512
            • Rml128
            • Rml80
            • Program-location
            • Rml64
            • Wml128
            • Rml48
            • Rml32
            • Rml08
            • Rml16
            • Wml80
              • Wml64
              • Wml08
              • Byte-listp
              • Wml48
              • Parametric-memory-reads-and-writes
              • Combine-n-bytes
              • Wml32
              • Program-at
              • Wml16
              • Combine-bytes
              • Write-canonical-address-to-memory-user-exec
              • Write-canonical-address-to-memory
              • Riml64
              • Wml-size
              • Rml-size
              • Riml32
              • Riml16
              • Riml08
              • Wiml64
              • Wiml32
              • Wiml16
              • Wiml08
              • Wiml-size
              • Generate-xr-over-write-thms
              • Generate-write-fn-over-xw-thms
              • Generate-read-fn-over-xw-thms
              • Riml-size
            • Rflag-specifications
            • Characterizing-undefined-behavior
            • Top-level-memory
            • App-view
            • X86-decoder
            • Physical-memory
            • Decoding-and-spec-utils
            • Instructions
            • Register-readers-and-writers
            • X86-modes
            • Segmentation
            • Other-non-deterministic-computations
            • Environment
            • Paging
          • Implemented-opcodes
          • To-do
          • Proof-utilities
          • Peripherals
          • Model-validation
          • Modelcalls
          • Concrete-simulation-examples
          • Utils
          • Debugging-code-proofs
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Linear-memory

    Wml80

    Signature
    (wml80 lin-addr val x86) → (mv * x86)

    Definitions and Theorems

    Theorem: wb-and-wvm80

    (defthm wb-and-wvm80
      (implies (and (app-view x86)
                    (canonical-address-p lin-addr)
                    (canonical-address-p (+ 9 lin-addr)))
               (equal (wvm80 lin-addr val x86)
                      (wb 10 lin-addr :w val x86))))

    Function: wml80

    (defun wml80 (lin-addr val x86)
     (declare (xargs :stobjs (x86)))
     (declare (type (signed-byte 48) lin-addr)
              (type (unsigned-byte 80) val))
     (declare (xargs :split-types t
                     :guard (and (canonical-address-p lin-addr)
                                 (unsigned-byte-p 80 val))))
     (let ((__function__ 'wml80))
      (declare (ignorable __function__))
      (if
       (mbt (canonical-address-p lin-addr))
       (let* ((9+lin-addr (the (signed-byte 49)
                               (+ 9 (the (signed-byte 48) lin-addr)))))
        (if
         (mbe :logic (canonical-address-p 9+lin-addr)
              :exec (< (the (signed-byte 49) 9+lin-addr)
                       140737488355328))
         (mbe
            :logic (wb 10 lin-addr :w val x86)
            :exec
            (if (app-view x86)
                (wvm80 lin-addr val x86)
              (b* (((mv flag (the (unsigned-byte 52) p-addr0)
                        x86)
                    (la-to-pa lin-addr :w x86))
                   ((when flag) (mv flag x86))
                   ((the (signed-byte 49) 1+lin-addr)
                    (+ 1 lin-addr))
                   ((mv flag (the (unsigned-byte 52) p-addr1)
                        x86)
                    (la-to-pa 1+lin-addr :w x86))
                   ((when flag) (mv flag x86))
                   ((the (signed-byte 50) 2+lin-addr)
                    (+ 2 lin-addr))
                   ((mv flag (the (unsigned-byte 52) p-addr2)
                        x86)
                    (la-to-pa 2+lin-addr :w x86))
                   ((when flag) (mv flag x86))
                   ((the (signed-byte 51) 3+lin-addr)
                    (+ 3 lin-addr))
                   ((mv flag (the (unsigned-byte 52) p-addr3)
                        x86)
                    (la-to-pa 3+lin-addr :w x86))
                   ((when flag) (mv flag x86))
                   ((the (signed-byte 52) 4+lin-addr)
                    (+ 4 lin-addr))
                   ((mv flag (the (unsigned-byte 52) p-addr4)
                        x86)
                    (la-to-pa 4+lin-addr :w x86))
                   ((when flag) (mv flag x86))
                   ((the (signed-byte 53) 5+lin-addr)
                    (+ 5 lin-addr))
                   ((mv flag (the (unsigned-byte 52) p-addr5)
                        x86)
                    (la-to-pa 5+lin-addr :w x86))
                   ((when flag) (mv flag x86))
                   ((the (signed-byte 54) 6+lin-addr)
                    (+ 6 lin-addr))
                   ((mv flag (the (unsigned-byte 52) p-addr6)
                        x86)
                    (la-to-pa 6+lin-addr :w x86))
                   ((when flag) (mv flag x86))
                   ((the (signed-byte 55) 7+lin-addr)
                    (+ 7 lin-addr))
                   ((mv flag (the (unsigned-byte 52) p-addr7)
                        x86)
                    (la-to-pa 7+lin-addr :w x86))
                   ((when flag) (mv flag x86))
                   ((the (signed-byte 56) 8+lin-addr)
                    (+ 8 lin-addr))
                   ((mv flag (the (unsigned-byte 52) p-addr8)
                        x86)
                    (la-to-pa 8+lin-addr :w x86))
                   ((when flag) (mv flag x86))
                   ((the (signed-byte 57) 9+lin-addr)
                    (+ 9 lin-addr))
                   ((mv flag (the (unsigned-byte 52) p-addr9)
                        x86)
                    (la-to-pa 9+lin-addr :w x86))
                   ((when flag) (mv flag x86))
                   (byte0 (mbe :logic (part-select val :low 0 :width 8)
                               :exec (the (unsigned-byte 8)
                                          (logand 255 val))))
                   (byte1 (mbe :logic (part-select val :low 8 :width 8)
                               :exec (the (unsigned-byte 8)
                                          (logand 255 (ash val -8)))))
                   (byte2 (mbe :logic (part-select val :low 16 :width 8)
                               :exec (the (unsigned-byte 8)
                                          (logand 255 (ash val -16)))))
                   (byte3 (mbe :logic (part-select val :low 24 :width 8)
                               :exec (the (unsigned-byte 8)
                                          (logand 255 (ash val -24)))))
                   (byte4 (mbe :logic (part-select val :low 32 :width 8)
                               :exec (the (unsigned-byte 8)
                                          (logand 255 (ash val -32)))))
                   (byte5 (mbe :logic (part-select val :low 40 :width 8)
                               :exec (the (unsigned-byte 8)
                                          (logand 255 (ash val -40)))))
                   (byte6 (mbe :logic (part-select val :low 48 :width 8)
                               :exec (the (unsigned-byte 8)
                                          (logand 255 (ash val -48)))))
                   (byte7 (mbe :logic (part-select val :low 56 :width 8)
                               :exec (the (unsigned-byte 8)
                                          (logand 255 (ash val -56)))))
                   (byte8 (mbe :logic (part-select val :low 64 :width 8)
                               :exec (the (unsigned-byte 8)
                                          (logand 255 (ash val -64)))))
                   (byte9 (mbe :logic (part-select val :low 72 :width 8)
                               :exec (the (unsigned-byte 8)
                                          (logand 255 (ash val -72)))))
                   (x86 (!memi p-addr0 byte0 x86))
                   (x86 (!memi p-addr1 byte1 x86))
                   (x86 (!memi p-addr2 byte2 x86))
                   (x86 (!memi p-addr3 byte3 x86))
                   (x86 (!memi p-addr4 byte4 x86))
                   (x86 (!memi p-addr5 byte5 x86))
                   (x86 (!memi p-addr6 byte6 x86))
                   (x86 (!memi p-addr7 byte7 x86))
                   (x86 (!memi p-addr8 byte8 x86))
                   (x86 (!memi p-addr9 byte9 x86)))
                (mv nil x86))))
         (mv 'wml80 x86)))
       (mv 'wml80 x86))))

    Theorem: x86p-wml80

    (defthm x86p-wml80
      (implies (force (x86p x86))
               (x86p (mv-nth 1 (wml80 lin-addr val x86))))
      :rule-classes (:rewrite :type-prescription))