• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
      • X86isa
      • Axe
      • Execloader
        • Elf-reader
          • Elf64_sym
          • Elf32_sym
          • Elf-header
          • Elf-section-header
          • Elf64-segment-header
          • Elf32-segment-header
          • Elf_bits32
          • Elf_bits8
            • Elf_bits8-fix
              • Elf_bits8-p
            • Elf_bits64
            • Elf_bits16
            • Section-info
            • Read-section-headers
            • Read-segment-headers-64
            • Read-segment-headers-32
            • Read-section-names
            • Elf64_sym-info
            • Elf32_sym-info
            • Read-elf-header
            • Parse-symtab-entries
            • Populate-elf-contents
            • Is-elf-content-p
            • Get-string-section-data
            • Get-section-info1
            • Set-elf-stobj-fields
            • Get-named-section-headers
            • Elf-read-mem-null-term
            • Get-section-info
            • Get-symtab-entries
            • Find-label-address-from-elf-symtab-info
            • Section-names
            • Populate-elf
            • Get-label-addresses
            • Elf-read-string-null-term
            • Get-label-address
            • Good-elf-p
            • Elf64_sym-equiv-under-mask
            • Elf64-segment-headers
            • Elf32_sym-equiv-under-mask
            • Elf32-segment-headers
            • Section-info-list
            • Elf64_sym-info-list
            • Elf32_sym-info-list
            • Elf-section-headers
            • Elf64_sym-debug
            • Elf32_sym-debug
          • Mach-o-reader
          • Merge-first-split-bytes
          • Split-bytes
          • Take-till-zero
          • Charlist->bytes
          • Merge-bytes
          • Bytes->charlist
          • String->bytes
          • Bytes->string
      • Math
      • Testing-utilities
    • Elf_bits8

    Elf_bits8-fix

    Fixing function for elf_bits8 bit structures.

    Signature
    (elf_bits8-fix x) → fty::fixed
    Arguments
    x — Guard (elf_bits8-p x).
    Returns
    fty::fixed — Type (elf_bits8-p fty::fixed).

    Definitions and Theorems

    Function: elf_bits8-fix

    (defun elf_bits8-fix (x)
      (declare (xargs :guard (elf_bits8-p x)))
      (let ((__function__ 'elf_bits8-fix))
        (declare (ignorable __function__))
        (mbe :logic (loghead 8 x) :exec x)))

    Theorem: elf_bits8-p-of-elf_bits8-fix

    (defthm elf_bits8-p-of-elf_bits8-fix
      (b* ((fty::fixed (elf_bits8-fix x)))
        (elf_bits8-p fty::fixed))
      :rule-classes :rewrite)

    Theorem: elf_bits8-fix-when-elf_bits8-p

    (defthm elf_bits8-fix-when-elf_bits8-p
      (implies (elf_bits8-p x)
               (equal (elf_bits8-fix x) x)))

    Function: elf_bits8-equiv$inline

    (defun elf_bits8-equiv$inline (x y)
      (declare (xargs :guard (and (elf_bits8-p x) (elf_bits8-p y))))
      (equal (elf_bits8-fix x)
             (elf_bits8-fix y)))

    Theorem: elf_bits8-equiv-is-an-equivalence

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

    Theorem: elf_bits8-equiv-implies-equal-elf_bits8-fix-1

    (defthm elf_bits8-equiv-implies-equal-elf_bits8-fix-1
      (implies (elf_bits8-equiv x x-equiv)
               (equal (elf_bits8-fix x)
                      (elf_bits8-fix x-equiv)))
      :rule-classes (:congruence))

    Theorem: elf_bits8-fix-under-elf_bits8-equiv

    (defthm elf_bits8-fix-under-elf_bits8-equiv
      (elf_bits8-equiv (elf_bits8-fix x) x)
      :rule-classes (:rewrite :rewrite-quoted-constant))