Recognizer for objdesign structures.
(objdesignp x) → *
Function:
(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:
(defthm consp-when-objdesignp (implies (objdesignp x) (consp x)) :rule-classes :compound-recognizer)