• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
      • X86isa
      • Axe
      • Execloader
        • Elf-reader
        • Mach-o-reader
          • Read-load_commands
          • Read-section_data_sz_structures
          • Mach-o-section-header
            • Mach-o-section-header-fix
            • Make-mach-o-section-header
            • Mach-o-section-header-equiv
            • Mach-o-section-header-p
              • Change-mach-o-section-header
              • Mach-o-section-header->segname
              • Mach-o-section-header->sectname
              • Mach-o-section-header->reserved3
              • Mach-o-section-header->reserved2
              • Mach-o-section-header->reserved1
              • Mach-o-section-header->reloff
              • Mach-o-section-header->offset
              • Mach-o-section-header->nreloc
              • Mach-o-section-header->size
              • Mach-o-section-header->flags
              • Mach-o-section-header->align
              • Mach-o-section-header->addr
            • Mach-o-header
            • Populate-mach-o-contents
            • Good-mach-o-p
            • Fill-data-segment-bytes
            • Fill-text-text-section-bytes
            • Fill-text-segment-bytes
            • Fill-text-cstring-section-bytes
            • Fill-text-const-section-bytes
            • Fill-data-dyld-section-bytes
            • Fill-data-data-section-bytes
            • Fill-data-const-section-bytes
            • Fill-data-common-section-bytes
            • Fill-data-bss-section-bytes
            • Read-mach_header
            • Populate-mach-o
            • Mach-o-section-headers
          • Merge-first-split-bytes
          • Split-bytes
          • Take-till-zero
          • Charlist->bytes
          • Merge-bytes
          • Bytes->charlist
          • String->bytes
          • Bytes->string
      • Math
      • Testing-utilities
    • Mach-o-section-header

    Mach-o-section-header-p

    Recognizer for mach-o-section-header structures.

    Signature
    (mach-o-section-header-p x) → *

    Definitions and Theorems

    Function: mach-o-section-header-p

    (defun mach-o-section-header-p (x)
     (declare (xargs :guard t))
     (let ((__function__ 'mach-o-section-header-p))
      (declare (ignorable __function__))
      (and
       (mbe
           :logic
           (and (alistp x)
                (equal (strip-cars x)
                       '(sectname segname
                                  addr size offset align reloff nreloc
                                  flags reserved1 reserved2 reserved3)))
           :exec (fty::alist-with-carsp
                      x
                      '(sectname segname
                                 addr size offset align reloff nreloc
                                 flags reserved1 reserved2 reserved3)))
       (b* ((sectname (cdr (std::da-nth 0 x)))
            (segname (cdr (std::da-nth 1 x)))
            (addr (cdr (std::da-nth 2 x)))
            (size (cdr (std::da-nth 3 x)))
            (offset (cdr (std::da-nth 4 x)))
            (align (cdr (std::da-nth 5 x)))
            (reloff (cdr (std::da-nth 6 x)))
            (nreloc (cdr (std::da-nth 7 x)))
            (flags (cdr (std::da-nth 8 x)))
            (reserved1 (cdr (std::da-nth 9 x)))
            (reserved2 (cdr (std::da-nth 10 x)))
            (reserved3 (cdr (std::da-nth 11 x))))
         (and (stringp sectname)
              (stringp segname)
              (natp addr)
              (natp size)
              (natp offset)
              (natp align)
              (natp reloff)
              (natp nreloc)
              (natp flags)
              (natp reserved1)
              (natp reserved2)
              (natp reserved3))))))

    Theorem: consp-when-mach-o-section-header-p

    (defthm consp-when-mach-o-section-header-p
      (implies (mach-o-section-header-p x)
               (consp x))
      :rule-classes :compound-recognizer)