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

    Write-canonical-address-to-memory

    Signature
    (write-canonical-address-to-memory lin-addr canonical-address x86) 
      → 
    (mv * x86)

    Definitions and Theorems

    Function: write-canonical-address-to-memory

    (defun write-canonical-address-to-memory
           (lin-addr canonical-address x86)
      (declare (xargs :stobjs (x86)))
      (declare (type (signed-byte 48) lin-addr)
               (type (signed-byte 48)
                     canonical-address))
      (let ((__function__ 'write-canonical-address-to-memory))
        (declare (ignorable __function__))
        (let* ((7+lin-addr (the (signed-byte 50) (+ 7 lin-addr))))
          (if (mbe :logic (canonical-address-p 7+lin-addr)
                   :exec (< (the (signed-byte 50) 7+lin-addr)
                            140737488355328))
              (if (app-view x86)
                  (mbe :logic (wb 8 lin-addr
                                  :w (loghead 64 canonical-address)
                                  x86)
                       :exec (write-canonical-address-to-memory-user-exec
                                  lin-addr canonical-address x86))
                (b* ((canonical-address-unsigned-val
                          (mbe :logic (loghead 64 canonical-address)
                               :exec (logand 18446744073709551615
                                             canonical-address))))
                  (wml64 lin-addr
                         canonical-address-unsigned-val x86)))
            (mv 'write-canonical-address-to-memory-error
                x86)))))

    Theorem: x86p-write-canonical-address-to-memory

    (defthm x86p-write-canonical-address-to-memory
      (implies (force (x86p x86))
               (x86p (mv-nth 1
                             (write-canonical-address-to-memory
                                  lin-addr canonical-address x86))))
      :rule-classes (:rewrite :type-prescription))