• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • 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
        • Farray
        • Rp-rewriter
        • Riscv
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Leftist-trees
        • Java
        • Taspi
        • Bitcoin
        • Des
        • Ethereum
        • X86isa
        • Sha-2
        • Yul
        • Zcash
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Poseidon
        • Where-do-i-place-my-book
        • Axe
        • Bigmems
        • Builtins
        • Execloader
        • Aleo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Community
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • 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)