Apply the blankargs transform to a module instance.
(vl-modinst-blankargs x ss nf warnings) → (mv warnings new-x vardecls nf)
This is just a wrapper for vl-modinst-plainarglist-blankargs that takes care of looking up the ports for the module being instanced.
Function:
(defun vl-modinst-blankargs (x ss nf warnings) (declare (xargs :guard (and (vl-modinst-p x) (vl-scopestack-p ss) (vl-namefactory-p nf) (vl-warninglist-p warnings)))) (let ((__function__ 'vl-modinst-blankargs)) (declare (ignorable __function__)) (b* ((x (vl-modinst-fix x)) (nf (vl-namefactory-fix nf)) ((when (vl-arguments-blankfree-p (vl-modinst->portargs x))) (mv (ok) x nil nf)) ((vl-modinst x) x) ((when (eq (vl-arguments-kind x.portargs) :vl-arguments-named)) (mv (fatal :type :vl-programming-error :msg "~a0: expected arguments to be plain argument lists, ~ but found named arguments. Did you forget to run ~ the argresolve transform first?" :args (list x)) x nil nf)) ((when x.range) (mv (fatal :type :vl-programming-error :msg "~a0: expected all instances to be replicated, but ~ this instance has range ~a1. Did you forget to run ~ the replicate transform first?" :args (list x x.range)) x nil nf)) (plainargs (vl-arguments-plain->args x.portargs)) (target-mod (vl-scopestack-find-definition x.modname ss)) ((unless (and target-mod (eq (tag target-mod) :vl-module))) (mv (fatal :type :vl-bad-instance :msg "~a0 refers to undefined module ~m1." :args (list x x.modname)) x nil nf)) (ports (vl-module->ports target-mod)) ((unless (same-lengthp plainargs ports)) (mv (fatal :type :vl-bad-instance :msg "~a0: expected ~x1 arguments, but found ~x2 arguments." :args (list x (len ports) (len plainargs))) x nil nf)) ((mv warnings new-plainargs vardecls nf) (vl-modinst-plainarglist-blankargs plainargs ports nf warnings x)) (new-args (make-vl-arguments-plain :args new-plainargs)) (x-prime (change-vl-modinst x :portargs new-args))) (mv warnings x-prime vardecls nf))))
Theorem:
(defthm vl-warninglist-p-of-vl-modinst-blankargs.warnings (b* (((mv ?warnings ?new-x ?vardecls ?nf) (vl-modinst-blankargs x ss nf warnings))) (vl-warninglist-p warnings)) :rule-classes :rewrite)
Theorem:
(defthm vl-modinst-p-of-vl-modinst-blankargs.new-x (b* (((mv ?warnings ?new-x ?vardecls ?nf) (vl-modinst-blankargs x ss nf warnings))) (vl-modinst-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-vardecllist-p-of-vl-modinst-blankargs.vardecls (b* (((mv ?warnings ?new-x ?vardecls ?nf) (vl-modinst-blankargs x ss nf warnings))) (vl-vardecllist-p vardecls)) :rule-classes :rewrite)
Theorem:
(defthm vl-namefactory-p-of-vl-modinst-blankargs.nf (b* (((mv ?warnings ?new-x ?vardecls ?nf) (vl-modinst-blankargs x ss nf warnings))) (vl-namefactory-p nf)) :rule-classes :rewrite)
Theorem:
(defthm vl-modinst-blankargs-mvtypes-2 (true-listp (mv-nth 2 (vl-modinst-blankargs x ss nf warnings))) :rule-classes :type-prescription)
Theorem:
(defthm vl-modinst-blankargs-of-vl-modinst-fix-x (equal (vl-modinst-blankargs (vl-modinst-fix x) ss nf warnings) (vl-modinst-blankargs x ss nf warnings)))
Theorem:
(defthm vl-modinst-blankargs-vl-modinst-equiv-congruence-on-x (implies (vl-modinst-equiv x x-equiv) (equal (vl-modinst-blankargs x ss nf warnings) (vl-modinst-blankargs x-equiv ss nf warnings))) :rule-classes :congruence)
Theorem:
(defthm vl-modinst-blankargs-of-vl-scopestack-fix-ss (equal (vl-modinst-blankargs x (vl-scopestack-fix ss) nf warnings) (vl-modinst-blankargs x ss nf warnings)))
Theorem:
(defthm vl-modinst-blankargs-vl-scopestack-equiv-congruence-on-ss (implies (vl-scopestack-equiv ss ss-equiv) (equal (vl-modinst-blankargs x ss nf warnings) (vl-modinst-blankargs x ss-equiv nf warnings))) :rule-classes :congruence)
Theorem:
(defthm vl-modinst-blankargs-of-vl-namefactory-fix-nf (equal (vl-modinst-blankargs x ss (vl-namefactory-fix nf) warnings) (vl-modinst-blankargs x ss nf warnings)))
Theorem:
(defthm vl-modinst-blankargs-vl-namefactory-equiv-congruence-on-nf (implies (vl-namefactory-equiv nf nf-equiv) (equal (vl-modinst-blankargs x ss nf warnings) (vl-modinst-blankargs x ss nf-equiv warnings))) :rule-classes :congruence)
Theorem:
(defthm vl-modinst-blankargs-of-vl-warninglist-fix-warnings (equal (vl-modinst-blankargs x ss nf (vl-warninglist-fix warnings)) (vl-modinst-blankargs x ss nf warnings)))
Theorem:
(defthm vl-modinst-blankargs-vl-warninglist-equiv-congruence-on-warnings (implies (vl-warninglist-equiv warnings warnings-equiv) (equal (vl-modinst-blankargs x ss nf warnings) (vl-modinst-blankargs x ss nf warnings-equiv))) :rule-classes :congruence)