Recognizer for obj-adeclor structures.
(obj-adeclorp x) → *
Function:
(defun obj-adeclorp (x) (declare (xargs :guard t)) (let ((__function__ 'obj-adeclorp)) (declare (ignorable __function__)) (and (consp x) (cond ((or (atom x) (eq (car x) :none)) (and (true-listp (cdr x)) (eql (len (cdr x)) 0) (b* nil t))) ((eq (car x) :pointer) (and (true-listp (cdr x)) (eql (len (cdr x)) 1) (b* ((decl (std::da-nth 0 (cdr x)))) (obj-adeclorp decl)))) (t (and (eq (car x) :array) (and (true-listp (cdr x)) (eql (len (cdr x)) 2)) (b* ((decl (std::da-nth 0 (cdr x))) (size (std::da-nth 1 (cdr x)))) (and (obj-adeclorp decl) (iconst-optionp size)))))))))
Theorem:
(defthm consp-when-obj-adeclorp (implies (obj-adeclorp x) (consp x)) :rule-classes :compound-recognizer)