• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • Soft
        • C
          • Syntax-for-tools
          • Atc
          • Language
            • Abstract-syntax
            • Integer-ranges
            • Implementation-environments
            • Dynamic-semantics
            • Static-semantics
            • Grammar
            • Integer-formats
            • Types
            • Portable-ascii-identifiers
            • Values
            • Integer-operations
            • Computation-states
            • Object-designators
              • Objdesign
                • Objdesign-fix
                • Objdesign-case
                • Objdesignp
                  • Objdesign-count
                  • Objdesign-equiv
                  • Objdesign-auto
                  • Objdesign-member
                  • Objdesign-element
                  • Objdesign-static
                  • Objdesign-alloc
                  • Objdesign-kind
                • Address
                • Object-disjointp
                • Objdesign-option
              • Operations
              • Errors
              • Tag-environments
              • Function-environments
              • Character-sets
              • Flexible-array-member-removal
              • Arithmetic-operations
              • Pointer-operations
              • Bytes
              • Keywords
              • Real-operations
              • Array-operations
              • Scalar-operations
              • Structure-operations
            • Representation
            • Transformation-tools
            • Insertion-sort
            • Pack
          • Bv
          • Imp-language
          • Event-macros
          • Java
          • Bitcoin
          • Ethereum
          • Yul
          • Zcash
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Lists-light
          • Axe
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Objdesign

    Objdesignp

    Recognizer for objdesign structures.

    Signature
    (objdesignp x) → *

    Definitions and Theorems

    Function: objdesignp

    (defun objdesignp (x)
      (declare (xargs :guard t))
      (let ((__function__ 'objdesignp))
        (declare (ignorable __function__))
        (and (consp x)
             (cond ((or (atom x) (eq (car x) :static))
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 1)
                         (b* ((name (std::da-nth 0 (cdr x))))
                           (identp name))))
                   ((eq (car x) :auto)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 3)
                         (b* ((name (std::da-nth 0 (cdr x)))
                              (frame (std::da-nth 1 (cdr x)))
                              (scope (std::da-nth 2 (cdr x))))
                           (and (identp name)
                                (natp frame)
                                (natp scope)))))
                   ((eq (car x) :alloc)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 1)
                         (b* ((get (std::da-nth 0 (cdr x))))
                           (addressp get))))
                   ((eq (car x) :element)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 2)
                         (b* ((super (std::da-nth 0 (cdr x)))
                              (index (std::da-nth 1 (cdr x))))
                           (and (objdesignp super) (natp index)))))
                   (t (and (eq (car x) :member)
                           (and (true-listp (cdr x))
                                (eql (len (cdr x)) 2))
                           (b* ((super (std::da-nth 0 (cdr x)))
                                (name (std::da-nth 1 (cdr x))))
                             (and (objdesignp super)
                                  (identp name)))))))))

    Theorem: consp-when-objdesignp

    (defthm consp-when-objdesignp
      (implies (objdesignp x) (consp x))
      :rule-classes :compound-recognizer)