(vl-build-subsequent-portdecls x base-decl) → portdecls
We have sometimes encountered very long port lists like
Function:
(defun vl-build-subsequent-portdecls (x base-decl) (declare (xargs :guard (and (vl-parsed-port-identifier-list-p x) (vl-portdecl-p base-decl)))) (let ((__function__ 'vl-build-subsequent-portdecls)) (declare (ignorable __function__)) (b* (((when (atom x)) nil) ((vl-parsed-port-identifier x1) (car x)) (basetype (vl-portdecl->type base-decl)) (- (or (not (vl-datatype->udims basetype)) (raise "Base datatype already has unpacked dimensions?"))) (type1 (if (consp x1.udims) (vl-datatype-update-udims x1.udims basetype) basetype))) (cons (change-vl-portdecl base-decl :name (vl-idtoken->name x1.name) :loc (vl-token->loc x1.name) :type type1) (vl-build-subsequent-portdecls (cdr x) base-decl)))))
Theorem:
(defthm vl-portdecllist-p-of-vl-build-subsequent-portdecls (b* ((portdecls (vl-build-subsequent-portdecls x base-decl))) (vl-portdecllist-p portdecls)) :rule-classes :rewrite)
Theorem:
(defthm true-listp-of-vl-build-subsequent-portdecls (b* ((portdecls (vl-build-subsequent-portdecls x base-decl))) (true-listp portdecls)) :rule-classes :type-prescription)
Theorem:
(defthm len-of-vl-build-subsequent-portdecls (b* ((portdecls (vl-build-subsequent-portdecls x base-decl))) (equal (len portdecls) (len x))) :rule-classes :rewrite)
Theorem:
(defthm consp-of-vl-build-subsequent-portdecls (b* ((portdecls (vl-build-subsequent-portdecls x base-decl))) (equal (consp portdecls) (consp x))) :rule-classes :rewrite)
Theorem:
(defthm vl-build-subsequent-portdecls-under-iff (b* ((portdecls (vl-build-subsequent-portdecls x base-decl))) (iff portdecls (consp x))) :rule-classes :rewrite)