Top-level function for resolving multiple drivers in a list of E occurrences.
Signature: (vl-add-res-modules all-names occs) returns
However, as a special exception,
Function:
(defun vl-add-res-modules (all-names occs) "Returns OCCS'" (declare (xargs :guard (and (vl-emodwirelist-p all-names) (vl-emodwirelist-p (collect-signal-list :o occs))))) (b* ((multiply-driven (duplicated-members (collect-signal-list :o occs))) ((unless multiply-driven) occs) (idx (vl-emodwirelist-highest "vl_res" all-names)) (mds (make-lookup-alist multiply-driven)) (sigma (len multiply-driven)) ((mv rw-occs idx sigma) (vl-res-rewrite-occs occs mds idx sigma)) (sigma (b* ((tmp (hons-shrink-alist sigma nil))) (fast-alist-free sigma) tmp)) ((mv res-occs ?idx) (vl-make-res-occs idx sigma))) (fast-alist-free mds) (fast-alist-free sigma) (append rw-occs res-occs)))
Theorem:
(defthm true-listp-of-vl-add-res-modules (implies (true-listp occs) (true-listp (vl-add-res-modules all-names occs))) :rule-classes :type-prescription)
Theorem:
(defthm good-esim-occsp-of-vl-add-res-modules (implies (and (force (good-esim-occsp occs)) (force (vl-emodwirelist-p (collect-signal-list :o occs)))) (good-esim-occsp (vl-add-res-modules all-names occs))))