(vl-convert-regs cvtregs vardecls portdecls) → (mv new-vardecls new-portdecls)
Function:
(defun vl-convert-regs (cvtregs vardecls portdecls) (declare (xargs :guard (and (string-listp cvtregs) (vl-vardecllist-p vardecls) (vl-portdecllist-p portdecls)))) (let ((__function__ 'vl-convert-regs)) (declare (ignorable __function__)) (b* ((cvtregs (string-list-fix cvtregs)) (vardecls (vl-vardecllist-fix vardecls)) (portdecls (vl-portdecllist-fix portdecls)) (non-regs (difference (mergesort cvtregs) (mergesort (vl-vardecllist->names vardecls)))) ((when non-regs) (raise "Trying to convert non-registers: ~x0.~%" non-regs) (mv vardecls portdecls)) ((mv vardecls-to-convert vardecls-to-leave-alone) (vl-filter-vardecls cvtregs vardecls)) ((mv portdecls-to-convert portdecls-to-leave-alone) (vl-filter-portdecls cvtregs portdecls)) (converted-vardecls (vl-always-convert-regs vardecls-to-convert)) (converted-portdecls (vl-always-convert-regports portdecls-to-convert))) (mv (append converted-vardecls vardecls-to-leave-alone) (append converted-portdecls portdecls-to-leave-alone)))))
Theorem:
(defthm vl-vardecllist-p-of-vl-convert-regs.new-vardecls (b* (((mv ?new-vardecls ?new-portdecls) (vl-convert-regs cvtregs vardecls portdecls))) (vl-vardecllist-p new-vardecls)) :rule-classes :rewrite)
Theorem:
(defthm vl-portdecllist-p-of-vl-convert-regs.new-portdecls (b* (((mv ?new-vardecls ?new-portdecls) (vl-convert-regs cvtregs vardecls portdecls))) (vl-portdecllist-p new-portdecls)) :rule-classes :rewrite)
Theorem:
(defthm vl-convert-regs-of-string-list-fix-cvtregs (equal (vl-convert-regs (string-list-fix cvtregs) vardecls portdecls) (vl-convert-regs cvtregs vardecls portdecls)))
Theorem:
(defthm vl-convert-regs-string-list-equiv-congruence-on-cvtregs (implies (str::string-list-equiv cvtregs cvtregs-equiv) (equal (vl-convert-regs cvtregs vardecls portdecls) (vl-convert-regs cvtregs-equiv vardecls portdecls))) :rule-classes :congruence)
Theorem:
(defthm vl-convert-regs-of-vl-vardecllist-fix-vardecls (equal (vl-convert-regs cvtregs (vl-vardecllist-fix vardecls) portdecls) (vl-convert-regs cvtregs vardecls portdecls)))
Theorem:
(defthm vl-convert-regs-vl-vardecllist-equiv-congruence-on-vardecls (implies (vl-vardecllist-equiv vardecls vardecls-equiv) (equal (vl-convert-regs cvtregs vardecls portdecls) (vl-convert-regs cvtregs vardecls-equiv portdecls))) :rule-classes :congruence)
Theorem:
(defthm vl-convert-regs-of-vl-portdecllist-fix-portdecls (equal (vl-convert-regs cvtregs vardecls (vl-portdecllist-fix portdecls)) (vl-convert-regs cvtregs vardecls portdecls)))
Theorem:
(defthm vl-convert-regs-vl-portdecllist-equiv-congruence-on-portdecls (implies (vl-portdecllist-equiv portdecls portdecls-equiv) (equal (vl-convert-regs cvtregs vardecls portdecls) (vl-convert-regs cvtregs vardecls portdecls-equiv))) :rule-classes :congruence)