Recognizer for type-qual structures.
(type-qualp x) → *
Function:
(defun type-qualp (x) (declare (xargs :guard t)) (let ((__function__ 'type-qualp)) (declare (ignorable __function__)) (and (consp x) (cond ((or (atom x) (eq (car x) :const)) (and (true-listp (cdr x)) (eql (len (cdr x)) 0) (b* nil t))) ((eq (car x) :restrict) (and (true-listp (cdr x)) (eql (len (cdr x)) 1) (b* ((uscores (std::da-nth 0 (cdr x)))) (keyword-uscores-p uscores)))) ((eq (car x) :volatile) (and (true-listp (cdr x)) (eql (len (cdr x)) 1) (b* ((uscores (std::da-nth 0 (cdr x)))) (keyword-uscores-p uscores)))) (t (and (eq (car x) :atomic) (and (true-listp (cdr x)) (eql (len (cdr x)) 0)) (b* nil t)))))))
Theorem:
(defthm consp-when-type-qualp (implies (type-qualp x) (consp x)) :rule-classes :compound-recognizer)