(vl-scopeinfo-resolve-params x scopeinfo ss final-params-acc warnings ctx) → (mv successp warnings new-scopeinfo final-params)
Function:
(defun vl-scopeinfo-resolve-params (x scopeinfo ss final-params-acc warnings ctx) (declare (xargs :guard (and (vl-paramdecloverridelist-p x) (vl-scopeinfo-p scopeinfo) (vl-scopestack-p ss) (vl-paramdecllist-p final-params-acc) (vl-warninglist-p warnings) (vl-context-p ctx)))) (let ((__function__ 'vl-scopeinfo-resolve-params)) (declare (ignorable __function__)) (b* (((when (atom x)) (mv t (ok) (vl-scopeinfo-fix scopeinfo) (revappend-without-guard (vl-paramdecllist-fix final-params-acc) nil))) ((vl-paramdecloverride x1) (car x)) (current-ss (vl-scopestack-push (vl-scopeinfo-fix scopeinfo) ss)) (subst-decl (vl-paramdecl-scopesubst x1.decl current-ss)) (ov-value (or x1.override (vl-paramtype->default (vl-paramdecl->type subst-decl)))) ((unless ov-value) (mv nil (fatal :type :vl-bad-inst :msg "~a0: no value for parameter ~s1." :args (list (vl-context-fix ctx) (vl-paramdecl->name x1.decl))) (vl-scopeinfo-fix scopeinfo) nil)) ((mv ok warnings final-value) (vl-override-parameter-value subst-decl ov-value current-ss warnings ctx)) ((unless ok) (mv nil warnings (vl-scopeinfo-fix scopeinfo) nil)) ((mv ok final-paramdecl) (vl-paramdecl-set-default subst-decl final-value)) ((unless ok) (mv nil (warn :type :vl-programming-error :msg "~a0: Tried to set the value of an type/value ~ parameter ~a1 as value/type ~a2" :args (list (vl-context-fix ctx) x1.decl final-value)) (vl-scopeinfo-fix scopeinfo) nil)) ((vl-scopeinfo scopeinfo)) (new-scopeinfo (change-vl-scopeinfo scopeinfo :locals (hons-acons (vl-paramdecl->name final-paramdecl) final-paramdecl scopeinfo.locals)))) (vl-scopeinfo-resolve-params (cdr x) new-scopeinfo ss (cons final-paramdecl final-params-acc) warnings ctx))))
Theorem:
(defthm vl-warninglist-p-of-vl-scopeinfo-resolve-params.warnings (b* (((mv ?successp ?warnings ?new-scopeinfo ?final-params) (vl-scopeinfo-resolve-params x scopeinfo ss final-params-acc warnings ctx))) (vl-warninglist-p warnings)) :rule-classes :rewrite)
Theorem:
(defthm vl-scopeinfo-p-of-vl-scopeinfo-resolve-params.new-scopeinfo (b* (((mv ?successp ?warnings ?new-scopeinfo ?final-params) (vl-scopeinfo-resolve-params x scopeinfo ss final-params-acc warnings ctx))) (vl-scopeinfo-p new-scopeinfo)) :rule-classes :rewrite)
Theorem:
(defthm vl-paramdecllist-p-of-vl-scopeinfo-resolve-params.final-params (b* (((mv ?successp ?warnings ?new-scopeinfo ?final-params) (vl-scopeinfo-resolve-params x scopeinfo ss final-params-acc warnings ctx))) (vl-paramdecllist-p final-params)) :rule-classes :rewrite)
Theorem:
(defthm vl-scopeinfo-resolve-params-of-vl-paramdecloverridelist-fix-x (equal (vl-scopeinfo-resolve-params (vl-paramdecloverridelist-fix x) scopeinfo ss final-params-acc warnings ctx) (vl-scopeinfo-resolve-params x scopeinfo ss final-params-acc warnings ctx)))
Theorem:
(defthm vl-scopeinfo-resolve-params-vl-paramdecloverridelist-equiv-congruence-on-x (implies (vl-paramdecloverridelist-equiv x x-equiv) (equal (vl-scopeinfo-resolve-params x scopeinfo ss final-params-acc warnings ctx) (vl-scopeinfo-resolve-params x-equiv scopeinfo ss final-params-acc warnings ctx))) :rule-classes :congruence)
Theorem:
(defthm vl-scopeinfo-resolve-params-of-vl-scopeinfo-fix-scopeinfo (equal (vl-scopeinfo-resolve-params x (vl-scopeinfo-fix scopeinfo) ss final-params-acc warnings ctx) (vl-scopeinfo-resolve-params x scopeinfo ss final-params-acc warnings ctx)))
Theorem:
(defthm vl-scopeinfo-resolve-params-vl-scopeinfo-equiv-congruence-on-scopeinfo (implies (vl-scopeinfo-equiv scopeinfo scopeinfo-equiv) (equal (vl-scopeinfo-resolve-params x scopeinfo ss final-params-acc warnings ctx) (vl-scopeinfo-resolve-params x scopeinfo-equiv ss final-params-acc warnings ctx))) :rule-classes :congruence)
Theorem:
(defthm vl-scopeinfo-resolve-params-of-vl-scopestack-fix-ss (equal (vl-scopeinfo-resolve-params x scopeinfo (vl-scopestack-fix ss) final-params-acc warnings ctx) (vl-scopeinfo-resolve-params x scopeinfo ss final-params-acc warnings ctx)))
Theorem:
(defthm vl-scopeinfo-resolve-params-vl-scopestack-equiv-congruence-on-ss (implies (vl-scopestack-equiv ss ss-equiv) (equal (vl-scopeinfo-resolve-params x scopeinfo ss final-params-acc warnings ctx) (vl-scopeinfo-resolve-params x scopeinfo ss-equiv final-params-acc warnings ctx))) :rule-classes :congruence)
Theorem:
(defthm vl-scopeinfo-resolve-params-of-vl-paramdecllist-fix-final-params-acc (equal (vl-scopeinfo-resolve-params x scopeinfo ss (vl-paramdecllist-fix final-params-acc) warnings ctx) (vl-scopeinfo-resolve-params x scopeinfo ss final-params-acc warnings ctx)))
Theorem:
(defthm vl-scopeinfo-resolve-params-vl-paramdecllist-equiv-congruence-on-final-params-acc (implies (vl-paramdecllist-equiv final-params-acc final-params-acc-equiv) (equal (vl-scopeinfo-resolve-params x scopeinfo ss final-params-acc warnings ctx) (vl-scopeinfo-resolve-params x scopeinfo ss final-params-acc-equiv warnings ctx))) :rule-classes :congruence)
Theorem:
(defthm vl-scopeinfo-resolve-params-of-vl-warninglist-fix-warnings (equal (vl-scopeinfo-resolve-params x scopeinfo ss final-params-acc (vl-warninglist-fix warnings) ctx) (vl-scopeinfo-resolve-params x scopeinfo ss final-params-acc warnings ctx)))
Theorem:
(defthm vl-scopeinfo-resolve-params-vl-warninglist-equiv-congruence-on-warnings (implies (vl-warninglist-equiv warnings warnings-equiv) (equal (vl-scopeinfo-resolve-params x scopeinfo ss final-params-acc warnings ctx) (vl-scopeinfo-resolve-params x scopeinfo ss final-params-acc warnings-equiv ctx))) :rule-classes :congruence)
Theorem:
(defthm vl-scopeinfo-resolve-params-of-vl-context-fix-ctx (equal (vl-scopeinfo-resolve-params x scopeinfo ss final-params-acc warnings (vl-context-fix ctx)) (vl-scopeinfo-resolve-params x scopeinfo ss final-params-acc warnings ctx)))
Theorem:
(defthm vl-scopeinfo-resolve-params-vl-context-equiv-congruence-on-ctx (implies (vl-context-equiv ctx ctx-equiv) (equal (vl-scopeinfo-resolve-params x scopeinfo ss final-params-acc warnings ctx) (vl-scopeinfo-resolve-params x scopeinfo ss final-params-acc warnings ctx-equiv))) :rule-classes :congruence)