Look up a definition in the defines list.
(vl-find-define name x) → guts
Function:
(defun vl-find-define (name x) (declare (xargs :guard (and (stringp name) (vl-defines-p x)))) (let ((__function__ 'vl-find-define)) (declare (ignorable __function__)) (cond ((atom x) nil) ((equal (string-fix name) (vl-define->name (car x))) (vl-define-fix (car x))) (t (vl-find-define name (cdr x))))))
Theorem:
(defthm return-type-of-vl-find-define (b* ((guts (vl-find-define name x))) (iff (vl-define-p guts) guts)) :rule-classes :rewrite)
Theorem:
(defthm vl-find-define-of-str-fix-name (equal (vl-find-define (str-fix name) x) (vl-find-define name x)))
Theorem:
(defthm vl-find-define-streqv-congruence-on-name (implies (streqv name name-equiv) (equal (vl-find-define name x) (vl-find-define name-equiv x))) :rule-classes :congruence)
Theorem:
(defthm vl-find-define-of-vl-defines-fix-x (equal (vl-find-define name (vl-defines-fix x)) (vl-find-define name x)))
Theorem:
(defthm vl-find-define-vl-defines-equiv-congruence-on-x (implies (vl-defines-equiv x x-equiv) (equal (vl-find-define name x) (vl-find-define name x-equiv))) :rule-classes :congruence)