(vl-parse-udp-or-module-instantiation atts &key (tokstream 'tokstream) (config 'config)) → (mv errmsg? value new-tokstream)
Function:
(defun vl-parse-udp-or-module-instantiation-fn (atts tokstream config) (declare (xargs :stobjs (tokstream))) (declare (xargs :guard (vl-loadconfig-p config))) (declare (ignorable config)) (declare (xargs :guard (vl-atts-p atts))) (let ((__function__ 'vl-parse-udp-or-module-instantiation)) (declare (ignorable __function__)) (b* ((backup (vl-tokstream-save)) ((mv m-err val tokstream) (vl-parse-module-instantiation atts)) ((unless m-err) (mv m-err val tokstream)) (tokstream (vl-tokstream-restore backup)) ((mv u-err val tokstream) (vl-parse-udp-instantiation atts)) ((unless u-err) (mv u-err val tokstream)) (tokstream (vl-tokstream-restore backup))) (mv (vl-udp/modinst-pick-error-to-report m-err u-err) nil tokstream))))
Theorem:
(defthm vl-parse-udp-or-module-instantiation-fails-gracefully (implies (mv-nth 0 (vl-parse-udp-or-module-instantiation atts)) (not (mv-nth 1 (vl-parse-udp-or-module-instantiation atts)))))
Theorem:
(defthm vl-warning-p-of-vl-parse-udp-or-module-instantiation (iff (vl-warning-p (mv-nth 0 (vl-parse-udp-or-module-instantiation atts))) (mv-nth 0 (vl-parse-udp-or-module-instantiation atts))))
Theorem:
(defthm vl-parse-udp-or-module-instantiation-result (implies (and (force (vl-atts-p atts))) (vl-modinstlist-p (mv-nth 1 (vl-parse-udp-or-module-instantiation atts)))))
Theorem:
(defthm vl-parse-udp-or-module-instantiation-true-listp (true-listp (mv-nth 1 (vl-parse-udp-or-module-instantiation atts))) :rule-classes :type-prescription)
Theorem:
(defthm vl-parse-udp-or-module-instantiation-count-strong (and (<= (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-udp-or-module-instantiation atts))) (vl-tokstream-measure)) (implies (not (mv-nth 0 (vl-parse-udp-or-module-instantiation atts))) (< (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-udp-or-module-instantiation atts))) (vl-tokstream-measure)))) :rule-classes ((:rewrite) (:linear)))