(vl-modulelist-check-port-bits x) maps vl-module-check-port-bits across a list.
(vl-modulelist-check-port-bits x) → new-x
Performance note. This will look expensive because it calls vl-module-wirealist, vl-portdecls-to-i/o and vl-portlist-msb-bit-pattern on all modules. But since these are memoized, we get to reuse this work when we generate the eoccs for module instances and need to look up these patterns.
Function:
(defun vl-modulelist-check-port-bits-exec (x acc) (declare (xargs :guard (vl-modulelist-p x))) (declare (xargs :guard t)) (let ((__function__ 'vl-modulelist-check-port-bits-exec)) (declare (ignorable __function__)) (if (consp x) (vl-modulelist-check-port-bits-exec (cdr x) (cons (vl-module-check-port-bits (car x)) acc)) acc)))
Function:
(defun vl-modulelist-check-port-bits-nrev (x nrev) (declare (xargs :stobjs (nrev))) (declare (xargs :guard (vl-modulelist-p x))) (declare (xargs :guard t)) (let ((__function__ 'vl-modulelist-check-port-bits-nrev)) (declare (ignorable __function__)) (if (atom x) (nrev-fix nrev) (let ((nrev (nrev-push (vl-module-check-port-bits (car x)) nrev))) (vl-modulelist-check-port-bits-nrev (cdr x) nrev)))))
Function:
(defun vl-modulelist-check-port-bits (x) (declare (xargs :guard (vl-modulelist-p x))) (declare (xargs :guard t)) (let ((__function__ 'vl-modulelist-check-port-bits)) (declare (ignorable __function__)) (mbe :logic (if (consp x) (cons (vl-module-check-port-bits (car x)) (vl-modulelist-check-port-bits (cdr x))) nil) :exec (if (atom x) nil (with-local-nrev (vl-modulelist-check-port-bits-nrev x nrev))))))
Theorem:
(defthm vl-modulelist-p-of-vl-modulelist-check-port-bits (b* ((new-x (vl-modulelist-check-port-bits x))) (vl-modulelist-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-modulelist-check-port-bits-of-update-nth (implies (<= (nfix acl2::n) (len acl2::x)) (equal (vl-modulelist-check-port-bits (update-nth acl2::n acl2::v acl2::x)) (update-nth acl2::n (vl-module-check-port-bits acl2::v) (vl-modulelist-check-port-bits acl2::x)))) :rule-classes ((:rewrite)))
Theorem:
(defthm vl-modulelist-check-port-bits-of-revappend (equal (vl-modulelist-check-port-bits (revappend acl2::x acl2::y)) (revappend (vl-modulelist-check-port-bits acl2::x) (vl-modulelist-check-port-bits acl2::y))) :rule-classes ((:rewrite)))
Theorem:
(defthm nthcdr-of-vl-modulelist-check-port-bits (equal (nthcdr acl2::n (vl-modulelist-check-port-bits acl2::x)) (vl-modulelist-check-port-bits (nthcdr acl2::n acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm nth-of-vl-modulelist-check-port-bits (equal (nth acl2::n (vl-modulelist-check-port-bits acl2::x)) (and (< (nfix acl2::n) (len acl2::x)) (vl-module-check-port-bits (nth acl2::n acl2::x)))) :rule-classes ((:rewrite)))
Theorem:
(defthm vl-modulelist-check-port-bits-nrev-removal (equal (vl-modulelist-check-port-bits-nrev acl2::x nrev) (append nrev (vl-modulelist-check-port-bits acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm vl-modulelist-check-port-bits-exec-removal (equal (vl-modulelist-check-port-bits-exec acl2::x acl2::acc) (revappend (vl-modulelist-check-port-bits acl2::x) acl2::acc)) :rule-classes ((:rewrite)))
Theorem:
(defthm vl-modulelist-check-port-bits-of-take (implies (<= (nfix acl2::n) (len acl2::x)) (equal (vl-modulelist-check-port-bits (take acl2::n acl2::x)) (take acl2::n (vl-modulelist-check-port-bits acl2::x)))) :rule-classes ((:rewrite)))
Theorem:
(defthm set-equiv-congruence-over-vl-modulelist-check-port-bits (implies (set-equiv acl2::x acl2::y) (set-equiv (vl-modulelist-check-port-bits acl2::x) (vl-modulelist-check-port-bits acl2::y))) :rule-classes ((:congruence)))
Theorem:
(defthm subsetp-of-vl-modulelist-check-port-bits-when-subsetp (implies (subsetp acl2::x acl2::y) (subsetp (vl-modulelist-check-port-bits acl2::x) (vl-modulelist-check-port-bits acl2::y))) :rule-classes ((:rewrite)))
Theorem:
(defthm member-of-vl-module-check-port-bits-in-vl-modulelist-check-port-bits (implies (member acl2::k acl2::x) (member (vl-module-check-port-bits acl2::k) (vl-modulelist-check-port-bits acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm vl-modulelist-check-port-bits-of-rev (equal (vl-modulelist-check-port-bits (rev acl2::x)) (rev (vl-modulelist-check-port-bits acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm vl-modulelist-check-port-bits-of-list-fix (equal (vl-modulelist-check-port-bits (list-fix acl2::x)) (vl-modulelist-check-port-bits acl2::x)) :rule-classes ((:rewrite)))
Theorem:
(defthm vl-modulelist-check-port-bits-of-append (equal (vl-modulelist-check-port-bits (append acl2::a acl2::b)) (append (vl-modulelist-check-port-bits acl2::a) (vl-modulelist-check-port-bits acl2::b))) :rule-classes ((:rewrite)))
Theorem:
(defthm cdr-of-vl-modulelist-check-port-bits (equal (cdr (vl-modulelist-check-port-bits acl2::x)) (vl-modulelist-check-port-bits (cdr acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm car-of-vl-modulelist-check-port-bits (equal (car (vl-modulelist-check-port-bits acl2::x)) (and (consp acl2::x) (vl-module-check-port-bits (car acl2::x)))) :rule-classes ((:rewrite)))
Theorem:
(defthm vl-modulelist-check-port-bits-under-iff (iff (vl-modulelist-check-port-bits acl2::x) (consp acl2::x)) :rule-classes ((:rewrite)))
Theorem:
(defthm consp-of-vl-modulelist-check-port-bits (equal (consp (vl-modulelist-check-port-bits acl2::x)) (consp acl2::x)) :rule-classes ((:rewrite)))
Theorem:
(defthm len-of-vl-modulelist-check-port-bits (equal (len (vl-modulelist-check-port-bits acl2::x)) (len acl2::x)) :rule-classes ((:rewrite)))
Theorem:
(defthm true-listp-of-vl-modulelist-check-port-bits (true-listp (vl-modulelist-check-port-bits acl2::x)) :rule-classes :type-prescription)
Theorem:
(defthm vl-modulelist-check-port-bits-when-not-consp (implies (not (consp acl2::x)) (equal (vl-modulelist-check-port-bits acl2::x) nil)) :rule-classes ((:rewrite)))
Theorem:
(defthm vl-modulelist-check-port-bits-of-cons (equal (vl-modulelist-check-port-bits (cons acl2::a acl2::b)) (cons (vl-module-check-port-bits acl2::a) (vl-modulelist-check-port-bits acl2::b))) :rule-classes ((:rewrite)))
Theorem:
(defthm vl-modulelist->names-of-vl-modulelist-check-port-bits (equal (vl-modulelist->names (vl-modulelist-check-port-bits x)) (vl-modulelist->names x)))