Processes a list of nicknames for SystemVerilog-syntax signals into an internal form.
(svtv-namemap->lhsmap x modidx moddb aliases) → (mv errs lhses)
Function:
(defun svtv-namemap->lhsmap (x modidx moddb aliases) (declare (xargs :stobjs (moddb aliases))) (declare (xargs :guard (and (svtv-namemap-p x) (natp modidx) (moddb-ok moddb)))) (declare (xargs :guard (svtv-mod-alias-guard modidx moddb aliases))) (let ((__function__ 'svtv-namemap->lhsmap)) (declare (ignorable __function__)) (b* (((when (atom x)) (mv nil nil)) ((unless (mbt (and (consp (car x)) (svar-p (caar x))))) (svtv-namemap->lhsmap (cdr x) modidx moddb aliases)) ((mv err1 first) (svtv-wire->lhs! (cdar x) modidx moddb aliases)) ((mv errs rest) (svtv-namemap->lhsmap (cdr x) modidx moddb aliases)) ((when err1) (mv (append-without-guard err1 errs) rest))) (mv errs (cons (cons (caar x) first) rest)))))
Theorem:
(defthm svtv-name-lhs-map-p-of-svtv-namemap->lhsmap.lhses (b* (((mv ?errs ?lhses) (svtv-namemap->lhsmap x modidx moddb aliases))) (svtv-name-lhs-map-p lhses)) :rule-classes :rewrite)
Theorem:
(defthm svtv-namemap->lhsmap-of-svtv-namemap-fix-x (equal (svtv-namemap->lhsmap (svtv-namemap-fix x) modidx moddb aliases) (svtv-namemap->lhsmap x modidx moddb aliases)))
Theorem:
(defthm svtv-namemap->lhsmap-svtv-namemap-equiv-congruence-on-x (implies (svtv-namemap-equiv x x-equiv) (equal (svtv-namemap->lhsmap x modidx moddb aliases) (svtv-namemap->lhsmap x-equiv modidx moddb aliases))) :rule-classes :congruence)
Theorem:
(defthm svtv-namemap->lhsmap-of-nfix-modidx (equal (svtv-namemap->lhsmap x (nfix modidx) moddb aliases) (svtv-namemap->lhsmap x modidx moddb aliases)))
Theorem:
(defthm svtv-namemap->lhsmap-nat-equiv-congruence-on-modidx (implies (nat-equiv modidx modidx-equiv) (equal (svtv-namemap->lhsmap x modidx moddb aliases) (svtv-namemap->lhsmap x modidx-equiv moddb aliases))) :rule-classes :congruence)
Theorem:
(defthm svtv-namemap->lhsmap-of-moddb-fix-moddb (equal (svtv-namemap->lhsmap x modidx (moddb-fix moddb) aliases) (svtv-namemap->lhsmap x modidx moddb aliases)))
Theorem:
(defthm svtv-namemap->lhsmap-moddb-equiv-congruence-on-moddb (implies (moddb-equiv moddb moddb-equiv) (equal (svtv-namemap->lhsmap x modidx moddb aliases) (svtv-namemap->lhsmap x modidx moddb-equiv aliases))) :rule-classes :congruence)
Theorem:
(defthm svtv-namemap->lhsmap-of-lhslist-fix-aliases (equal (svtv-namemap->lhsmap x modidx moddb (lhslist-fix aliases)) (svtv-namemap->lhsmap x modidx moddb aliases)))
Theorem:
(defthm svtv-namemap->lhsmap-lhslist-equiv-congruence-on-aliases (implies (lhslist-equiv aliases aliases-equiv) (equal (svtv-namemap->lhsmap x modidx moddb aliases) (svtv-namemap->lhsmap x modidx moddb aliases-equiv))) :rule-classes :congruence)