Matches the rest of any
(vl-parse-port-declaration-noatts-2012 atts &key (tokstream 'tokstream) (config 'config)) → (mv errmsg? value new-tokstream)
BOZO many, many subtle questions here about the net types we're supposed to use here. See the comments.
Function:
(defun vl-parse-port-declaration-noatts-2012-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-port-declaration-noatts-2012)) (declare (ignorable __function__)) (seq tokstream (when (vl-is-token? :vl-kwd-inout) (:= (vl-match)) (head := (vl-parse-port-declaration-head-2012)) (when (vl-parsed-portdecl-head->var-p head) (return-raw (vl-parse-error "Inout ports cannot have variable types, they must be nets."))) (pids := (vl-parse-list-of-port-identifiers)) (return (b* (((vl-parsed-portdecl-head head))) (vl-make-ports-and-maybe-nets pids :dir :vl-inout :nettype (or head.nettype :vl-wire) :type head.type :complete-p (vl-parsed-portdecl-head->complete-p head) :atts atts)))) (when (vl-is-token? :vl-kwd-input) (:= (vl-match)) (head := (vl-parse-port-declaration-head-2012)) (pids := (vl-parse-list-of-port-identifiers)) (return (b* (((vl-parsed-portdecl-head head))) (vl-make-ports-and-maybe-nets pids :dir :vl-input :nettype (if head.var-p nil (or head.nettype :vl-wire)) :type head.type :complete-p (vl-parsed-portdecl-head->complete-p head) :atts atts)))) (when (vl-is-token? :vl-kwd-output) (:= (vl-match)) (head := (vl-parse-port-declaration-head-2012)) (pids := (vl-parse-list-of-port-identifiers)) (return (b* (((vl-parsed-portdecl-head head))) (vl-make-ports-and-maybe-nets pids :dir :vl-output :nettype (cond (head.var-p nil) (head.nettype head.nettype) (head.explicit-p nil) (t :vl-wire)) :type head.type :complete-p (vl-parsed-portdecl-head->complete-p head) :atts atts)))) (when (vl-is-token? :vl-kwd-ref) (return-raw (vl-parse-error "BOZO ref ports are not yet implemented."))) (:= (vl-match-token :vl-idtoken)) (return-raw (vl-parse-error "BOZO interface ports are not yet implemented.")))))
Theorem:
(defthm vl-parse-port-declaration-noatts-2012-fails-gracefully (implies (mv-nth 0 (vl-parse-port-declaration-noatts-2012 atts)) (not (mv-nth 1 (vl-parse-port-declaration-noatts-2012 atts)))))
Theorem:
(defthm vl-warning-p-of-vl-parse-port-declaration-noatts-2012 (iff (vl-warning-p (mv-nth 0 (vl-parse-port-declaration-noatts-2012 atts))) (mv-nth 0 (vl-parse-port-declaration-noatts-2012 atts))))
Theorem:
(defthm vl-parse-port-declaration-noatts-2012-result (implies (and (force (vl-atts-p atts))) (equal (consp (mv-nth 1 (vl-parse-port-declaration-noatts-2012 atts))) (not (mv-nth 0 (vl-parse-port-declaration-noatts-2012 atts))))))
Theorem:
(defthm vl-parse-port-declaration-noatts-2012-count-strong (and (<= (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-port-declaration-noatts-2012 atts))) (vl-tokstream-measure)) (implies (not (mv-nth 0 (vl-parse-port-declaration-noatts-2012 atts))) (< (vl-tokstream-measure :tokstream (mv-nth 2 (vl-parse-port-declaration-noatts-2012 atts))) (vl-tokstream-measure)))) :rule-classes ((:rewrite) (:linear)))
Theorem:
(defthm true-listp-of-vl-parse-port-declaration-noatts-2012-1 (true-listp (car (mv-nth 1 (vl-parse-port-declaration-noatts-2012 atts)))) :rule-classes :type-prescription)
Theorem:
(defthm true-listp-of-vl-parse-port-declaration-noatts-2012-2 (true-listp (cdr (mv-nth 1 (vl-parse-port-declaration-noatts-2012 atts)))) :rule-classes :type-prescription)
Theorem:
(defthm vl-parse-port-declaration-noatts-2012-basics (and (vl-portdecllist-p (car (mv-nth 1 (vl-parse-port-declaration-noatts-2012 atts)))) (vl-vardecllist-p (cdr (mv-nth 1 (vl-parse-port-declaration-noatts-2012 atts))))))