Recognizer for vl-rhs structures.
(vl-rhs-p x) → *
Function:
(defun vl-rhs-p (x) (declare (xargs :guard t)) (let ((__function__ 'vl-rhs-p)) (declare (ignorable __function__)) (and (consp x) (cond ((or (atom x) (eq (car x) :vl-rhsexpr)) (and (true-listp (cdr x)) (eql (len (cdr x)) 1) (b* ((guts (std::da-nth 0 (cdr x)))) (vl-expr-p guts)))) (t (and (eq (car x) :vl-rhsnew) (and (true-listp (cdr x)) (eql (len (cdr x)) 2)) (b* ((arrsize (std::da-nth 0 (cdr x))) (args (std::da-nth 1 (cdr x)))) (and (vl-maybe-expr-p arrsize) (vl-exprlist-p args)))))))))
Theorem:
(defthm consp-when-vl-rhs-p (implies (vl-rhs-p x) (consp x)) :rule-classes :compound-recognizer)