Apply the argresolve transformation to some arguments.
(vl-arguments-argresolve x ss ports scope warnings inst) → (mv warnings new-x)
This wrapper is really the heart of the argresolve
transform. We convert
Function:
(defun vl-arguments-argresolve (x ss ports scope warnings inst) (declare (xargs :guard (and (vl-arguments-p x) (vl-scopestack-p ss) (vl-portlist-p ports) (vl-scope-p scope) (vl-warninglist-p warnings) (vl-modinst-p inst)))) (let ((__function__ 'vl-arguments-argresolve)) (declare (ignorable __function__)) (b* (((mv successp warnings x) (vl-convert-namedargs x ss ports warnings inst)) ((unless successp) (mv (ok) x)) (inst (vl-modinst-fix inst)) (plainargs (vl-arguments-plain->args x)) ((unless (same-lengthp plainargs ports)) (b* ((nports (len ports)) (nargs (len plainargs))) (mv (fatal :type :vl-instance-wrong-arity :msg "~a0 ~s1 ~x2 ~s3, but module ~m4 ~s5 ~x6 ~s7." :args (list inst (if (< nargs nports) "only has" "has") nargs (if (= nargs 1) "argument" "arguments") (vl-modinst->modname inst) (if (< nargs nports) "has" "only has") nports (if (= nports 1) "port" "ports"))) x))) (plainargs (vl-annotate-plainargs plainargs ports scope)) (warnings (vl-check-blankargs plainargs ports inst warnings)) ((mv warnings plainargs) (vl-unhierarchicalize-interfaceports plainargs ports ss inst warnings)) (new-x (make-vl-arguments-plain :args plainargs))) (mv (ok) new-x))))
Theorem:
(defthm vl-warninglist-p-of-vl-arguments-argresolve.warnings (b* (((mv ?warnings ?new-x) (vl-arguments-argresolve x ss ports scope warnings inst))) (vl-warninglist-p warnings)) :rule-classes :rewrite)
Theorem:
(defthm vl-arguments-p-of-vl-arguments-argresolve.new-x (b* (((mv ?warnings ?new-x) (vl-arguments-argresolve x ss ports scope warnings inst))) (vl-arguments-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-arguments-argresolve-of-vl-arguments-fix-x (equal (vl-arguments-argresolve (vl-arguments-fix x) ss ports scope warnings inst) (vl-arguments-argresolve x ss ports scope warnings inst)))
Theorem:
(defthm vl-arguments-argresolve-vl-arguments-equiv-congruence-on-x (implies (vl-arguments-equiv x x-equiv) (equal (vl-arguments-argresolve x ss ports scope warnings inst) (vl-arguments-argresolve x-equiv ss ports scope warnings inst))) :rule-classes :congruence)
Theorem:
(defthm vl-arguments-argresolve-of-vl-scopestack-fix-ss (equal (vl-arguments-argresolve x (vl-scopestack-fix ss) ports scope warnings inst) (vl-arguments-argresolve x ss ports scope warnings inst)))
Theorem:
(defthm vl-arguments-argresolve-vl-scopestack-equiv-congruence-on-ss (implies (vl-scopestack-equiv ss ss-equiv) (equal (vl-arguments-argresolve x ss ports scope warnings inst) (vl-arguments-argresolve x ss-equiv ports scope warnings inst))) :rule-classes :congruence)
Theorem:
(defthm vl-arguments-argresolve-of-vl-portlist-fix-ports (equal (vl-arguments-argresolve x ss (vl-portlist-fix ports) scope warnings inst) (vl-arguments-argresolve x ss ports scope warnings inst)))
Theorem:
(defthm vl-arguments-argresolve-vl-portlist-equiv-congruence-on-ports (implies (vl-portlist-equiv ports ports-equiv) (equal (vl-arguments-argresolve x ss ports scope warnings inst) (vl-arguments-argresolve x ss ports-equiv scope warnings inst))) :rule-classes :congruence)
Theorem:
(defthm vl-arguments-argresolve-of-vl-scope-fix-scope (equal (vl-arguments-argresolve x ss ports (vl-scope-fix scope) warnings inst) (vl-arguments-argresolve x ss ports scope warnings inst)))
Theorem:
(defthm vl-arguments-argresolve-vl-scope-equiv-congruence-on-scope (implies (vl-scope-equiv scope scope-equiv) (equal (vl-arguments-argresolve x ss ports scope warnings inst) (vl-arguments-argresolve x ss ports scope-equiv warnings inst))) :rule-classes :congruence)
Theorem:
(defthm vl-arguments-argresolve-of-vl-warninglist-fix-warnings (equal (vl-arguments-argresolve x ss ports scope (vl-warninglist-fix warnings) inst) (vl-arguments-argresolve x ss ports scope warnings inst)))
Theorem:
(defthm vl-arguments-argresolve-vl-warninglist-equiv-congruence-on-warnings (implies (vl-warninglist-equiv warnings warnings-equiv) (equal (vl-arguments-argresolve x ss ports scope warnings inst) (vl-arguments-argresolve x ss ports scope warnings-equiv inst))) :rule-classes :congruence)
Theorem:
(defthm vl-arguments-argresolve-of-vl-modinst-fix-inst (equal (vl-arguments-argresolve x ss ports scope warnings (vl-modinst-fix inst)) (vl-arguments-argresolve x ss ports scope warnings inst)))
Theorem:
(defthm vl-arguments-argresolve-vl-modinst-equiv-congruence-on-inst (implies (vl-modinst-equiv inst inst-equiv) (equal (vl-arguments-argresolve x ss ports scope warnings inst) (vl-arguments-argresolve x ss ports scope warnings inst-equiv))) :rule-classes :congruence)