(vl-parse-udp-instance loc modname str delay atts &key (tokstream 'tokstream) (config 'config)) → (mv errmsg? value new-tokstream)
Function:
(defun vl-parse-udp-instance-fn (loc modname str delay atts tokstream config) (declare (xargs :stobjs (tokstream))) (declare (xargs :guard (vl-loadconfig-p config))) (declare (ignorable config)) (declare (xargs :guard (and (vl-location-p loc) (stringp modname) (vl-maybe-gatestrength-p str) (vl-maybe-gatedelay-p delay) (vl-atts-p atts)))) (let ((__function__ 'vl-parse-udp-instance)) (declare (ignorable __function__)) (seq tokstream (when (vl-is-token? :vl-idtoken) (inst-id := (vl-match-token :vl-idtoken)) (when (vl-is-token? :vl-lbrack) (range := (vl-parse-range)))) (:= (vl-match-token :vl-lparen)) (lvalue := (vl-parse-net-lvalue)) (:= (vl-match-token :vl-comma)) (exprs := (vl-parse-1+-expressions-separated-by-commas)) (:= (vl-match-token :vl-rparen)) (return (make-vl-modinst :loc loc :instname (and inst-id (vl-idtoken->name inst-id)) :modname modname :range range :paramargs (make-vl-paramargs-plain :args nil) :portargs (make-vl-arguments-plain :args (vl-exprlist-to-plainarglist (cons lvalue exprs))) :str str :delay delay :atts atts)))))
Theorem:
(defthm vl-parse-udp-instance-fails-gracefully (implies (mv-nth 0 (vl-parse-udp-instance loc modname str delay atts)) (not (mv-nth 1 (vl-parse-udp-instance loc modname str delay atts)))))
Theorem:
(defthm vl-warning-p-of-vl-parse-udp-instance (iff (vl-warning-p (mv-nth 0 (vl-parse-udp-instance loc modname str delay atts))) (mv-nth 0 (vl-parse-udp-instance loc modname str delay atts))))
Theorem:
(defthm vl-parse-udp-instance-result (implies (and (and (force (vl-location-p loc)) (force (stringp modname)) (force (vl-maybe-gatestrength-p str)) (force (vl-maybe-gatedelay-p delay)) (force (vl-atts-p atts)))) (equal (vl-modinst-p (mv-nth 1 (vl-parse-udp-instance loc modname str delay atts))) (not (mv-nth 0 (vl-parse-udp-instance loc modname str delay atts))))))
Theorem:
(defthm vl-parse-udp-instance-count-strong (and (<= (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-udp-instance loc modname str delay atts))) (vl-tokstream-measure)) (implies (not (mv-nth 0 (vl-parse-udp-instance loc modname str delay atts))) (< (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-udp-instance loc modname str delay atts))) (vl-tokstream-measure)))) :rule-classes ((:rewrite) (:linear)))