Recognizer for vl-sequence structures.
(vl-sequence-p x) → *
Function:
(defun vl-sequence-p (x) (declare (xargs :guard t)) (let ((__function__ 'vl-sequence-p)) (declare (ignorable __function__)) (and (consp x) (eq (car x) :vl-sequence) (mbe :logic (and (alistp (cdr x)) (equal (strip-cars (cdr x)) '(name ports decls expr loc))) :exec (fty::alist-with-carsp (cdr x) '(name ports decls expr loc))) (b* ((name (cdr (std::da-nth 0 (cdr x)))) (ports (cdr (std::da-nth 1 (cdr x)))) (decls (cdr (std::da-nth 2 (cdr x)))) (expr (cdr (std::da-nth 3 (cdr x)))) (loc (cdr (std::da-nth 4 (cdr x))))) (and (stringp name) (vl-propportlist-p ports) (vl-vardecllist-p decls) (vl-propexpr-p expr) (vl-location-p loc))))))
Theorem:
(defthm consp-when-vl-sequence-p (implies (vl-sequence-p x) (consp x)) :rule-classes :compound-recognizer)