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