• 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
        • Implemented-opcodes
        • To-do
        • Proof-utilities
        • Peripherals
        • Model-validation
        • Modelcalls
        • Concrete-simulation-examples
        • Utils
        • Debugging-code-proofs
          • System-level-marking-view-proof-utilities
            • Rb-alt
            • Unwind-x86-interpreter-in-marking-view
            • Program-at-alt
            • Get-prefixes-alt
            • Get-prefixes-in-system-level-marking-view
            • Rb-in-system-level-marking-view
            • Xlate-equiv-memory-and-rml08
            • Reasoning-about-page-tables
              • Create-qword-address-list
              • Mult-8-qword-paddr-listp
              • Gather-paging-structures
                • Gather-all-paging-structure-qword-addresses
                • All-mem-except-paging-structures-equal
                • Gather-qword-addresses-corresponding-to-1-entry
                • Xlation-governing-entries-paddrs
                • Xlate-equiv-structures
                • Xlation-governing-entries-paddrs-for-page-dir-ptr-table
                • Xlation-governing-entries-paddrs-for-page-directory
                • All-xlation-governing-entries-paddrs
                • Xlation-governing-entries-paddrs-for-pml4-table
                • Xlation-governing-entries-paddrs-for-page-table
                • Gather-pml4-table-qword-addresses
                • Xlate-equiv-memory
                  • Open-qword-paddr-list
                • Qword-paddr-listp
                • Find-l-addrs-from-disjoint-p$-of-two-las-to-pas-aux
                • Find-first-arg-of-disjoint-p$-candidates
                • Paging-basics
              • Las-to-pas-two-n-ind-hint
              • Find-l-addrs-from-disjoint-p-of-las-to-pas-1-aux
              • Replace-element
              • Phys-mem-values-same
            • Non-marking-view-proof-utilities
            • App-view-proof-utilities
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Gather-paging-structures

    Xlate-equiv-memory

    Signature
    (xlate-equiv-memory x86-1 x86-2) → *

    Definitions and Theorems

    Function: xlate-equiv-memory

    (defun xlate-equiv-memory (x86-1 x86-2)
     (declare (xargs :guard (and (x86p x86-1) (x86p x86-2))
                     :non-executable t))
     (prog2$
        (acl2::throw-nonexec-error 'xlate-equiv-memory
                                   (list x86-1 x86-2))
        (let ((__function__ 'xlate-equiv-memory))
          (declare (ignorable __function__))
          (if (and (equal (xr :app-view nil x86-1) nil)
                   (equal (xr :app-view nil x86-2) nil)
                   (64-bit-modep x86-1)
                   (64-bit-modep x86-2))
              (and (xlate-equiv-structures x86-1 x86-2)
                   (all-mem-except-paging-structures-equal x86-1 x86-2))
            (equal x86-1 x86-2)))))

    Theorem: xlate-equiv-memory-is-an-equivalence

    (defthm xlate-equiv-memory-is-an-equivalence
      (and (booleanp (xlate-equiv-memory x y))
           (xlate-equiv-memory x x)
           (implies (xlate-equiv-memory x y)
                    (xlate-equiv-memory y x))
           (implies (and (xlate-equiv-memory x y)
                         (xlate-equiv-memory y z))
                    (xlate-equiv-memory x z)))
      :rule-classes (:equivalence))

    Theorem: xlate-equiv-memory-refines-xlate-equiv-structures

    (defthm xlate-equiv-memory-refines-xlate-equiv-structures
      (implies (xlate-equiv-memory x86-1 x86-2)
               (xlate-equiv-structures x86-1 x86-2))
      :rule-classes :refinement)

    Theorem: xlate-equiv-memory-refines-all-mem-except-paging-structures-equal

    (defthm
      xlate-equiv-memory-refines-all-mem-except-paging-structures-equal
      (implies (xlate-equiv-memory x86-1 x86-2)
               (all-mem-except-paging-structures-equal x86-1 x86-2))
      :rule-classes :refinement)

    Theorem: xlate-equiv-memory-implies-equal-64-bit-modep-1

    (defthm xlate-equiv-memory-implies-equal-64-bit-modep-1
      (implies (xlate-equiv-memory x86 x86-equiv)
               (equal (64-bit-modep x86)
                      (64-bit-modep x86-equiv)))
      :rule-classes (:congruence))

    Theorem: xlate-equiv-memory-and-xw-rflags

    (defthm xlate-equiv-memory-and-xw-rflags
      (implies (and (equal (rflagsbits->ac val)
                           (rflagsbits->ac (xr :rflags nil x86)))
                    (64-bit-modep x86)
                    (not (app-view x86)))
               (xlate-equiv-memory (xw :rflags nil val x86)
                                   (double-rewrite x86))))