(vl-scope-finalize-params x formals actuals warnings ss ctx) → (mv successp warnings new-ss final-paramdecls)
Function:
(defun vl-scope-finalize-params (x formals actuals warnings ss ctx) (declare (xargs :guard (and (vl-scope-p x) (vl-paramdecllist-p formals) (vl-paramargs-p actuals) (vl-warninglist-p warnings) (vl-scopestack-p ss) (vl-context-p ctx)))) (let ((__function__ 'vl-scope-finalize-params)) (declare (ignorable __function__)) (b* (((mv ok warnings overrides) (vl-make-paramdecloverrides formals actuals warnings ctx)) ((unless ok) (mv nil warnings (vl-scopestack-fix ss) nil)) (scopeinfo (vl-scope->scopeinfo x (vl-scopestack->design ss))) (scopeinfo-with-empty-params (change-vl-scopeinfo scopeinfo :locals (make-fast-alist (vl-paramdecllist-alist (vl-paramdecllist-remove-defaults formals) (vl-scopeinfo->locals scopeinfo))))) ((mv ok warnings scopeinfo-with-real-params final-paramdecls) (vl-scopeinfo-resolve-params overrides scopeinfo-with-empty-params ss nil warnings ctx))) (mv ok warnings (vl-scopestack-push scopeinfo-with-real-params ss) final-paramdecls))))
Theorem:
(defthm vl-warninglist-p-of-vl-scope-finalize-params.warnings (b* (((mv ?successp ?warnings ?new-ss ?final-paramdecls) (vl-scope-finalize-params x formals actuals warnings ss ctx))) (vl-warninglist-p warnings)) :rule-classes :rewrite)
Theorem:
(defthm vl-scopestack-p-of-vl-scope-finalize-params.new-ss (b* (((mv ?successp ?warnings ?new-ss ?final-paramdecls) (vl-scope-finalize-params x formals actuals warnings ss ctx))) (vl-scopestack-p new-ss)) :rule-classes :rewrite)
Theorem:
(defthm vl-paramdecllist-p-of-vl-scope-finalize-params.final-paramdecls (b* (((mv ?successp ?warnings ?new-ss ?final-paramdecls) (vl-scope-finalize-params x formals actuals warnings ss ctx))) (vl-paramdecllist-p final-paramdecls)) :rule-classes :rewrite)
Theorem:
(defthm vl-scope-finalize-params-of-vl-scope-fix-x (equal (vl-scope-finalize-params (vl-scope-fix x) formals actuals warnings ss ctx) (vl-scope-finalize-params x formals actuals warnings ss ctx)))
Theorem:
(defthm vl-scope-finalize-params-vl-scope-equiv-congruence-on-x (implies (vl-scope-equiv x x-equiv) (equal (vl-scope-finalize-params x formals actuals warnings ss ctx) (vl-scope-finalize-params x-equiv formals actuals warnings ss ctx))) :rule-classes :congruence)
Theorem:
(defthm vl-scope-finalize-params-of-vl-paramdecllist-fix-formals (equal (vl-scope-finalize-params x (vl-paramdecllist-fix formals) actuals warnings ss ctx) (vl-scope-finalize-params x formals actuals warnings ss ctx)))
Theorem:
(defthm vl-scope-finalize-params-vl-paramdecllist-equiv-congruence-on-formals (implies (vl-paramdecllist-equiv formals formals-equiv) (equal (vl-scope-finalize-params x formals actuals warnings ss ctx) (vl-scope-finalize-params x formals-equiv actuals warnings ss ctx))) :rule-classes :congruence)
Theorem:
(defthm vl-scope-finalize-params-of-vl-paramargs-fix-actuals (equal (vl-scope-finalize-params x formals (vl-paramargs-fix actuals) warnings ss ctx) (vl-scope-finalize-params x formals actuals warnings ss ctx)))
Theorem:
(defthm vl-scope-finalize-params-vl-paramargs-equiv-congruence-on-actuals (implies (vl-paramargs-equiv actuals actuals-equiv) (equal (vl-scope-finalize-params x formals actuals warnings ss ctx) (vl-scope-finalize-params x formals actuals-equiv warnings ss ctx))) :rule-classes :congruence)
Theorem:
(defthm vl-scope-finalize-params-of-vl-warninglist-fix-warnings (equal (vl-scope-finalize-params x formals actuals (vl-warninglist-fix warnings) ss ctx) (vl-scope-finalize-params x formals actuals warnings ss ctx)))
Theorem:
(defthm vl-scope-finalize-params-vl-warninglist-equiv-congruence-on-warnings (implies (vl-warninglist-equiv warnings warnings-equiv) (equal (vl-scope-finalize-params x formals actuals warnings ss ctx) (vl-scope-finalize-params x formals actuals warnings-equiv ss ctx))) :rule-classes :congruence)
Theorem:
(defthm vl-scope-finalize-params-of-vl-scopestack-fix-ss (equal (vl-scope-finalize-params x formals actuals warnings (vl-scopestack-fix ss) ctx) (vl-scope-finalize-params x formals actuals warnings ss ctx)))
Theorem:
(defthm vl-scope-finalize-params-vl-scopestack-equiv-congruence-on-ss (implies (vl-scopestack-equiv ss ss-equiv) (equal (vl-scope-finalize-params x formals actuals warnings ss ctx) (vl-scope-finalize-params x formals actuals warnings ss-equiv ctx))) :rule-classes :congruence)
Theorem:
(defthm vl-scope-finalize-params-of-vl-context-fix-ctx (equal (vl-scope-finalize-params x formals actuals warnings ss (vl-context-fix ctx)) (vl-scope-finalize-params x formals actuals warnings ss ctx)))
Theorem:
(defthm vl-scope-finalize-params-vl-context-equiv-congruence-on-ctx (implies (vl-context-equiv ctx ctx-equiv) (equal (vl-scope-finalize-params x formals actuals warnings ss ctx) (vl-scope-finalize-params x formals actuals warnings ss ctx-equiv))) :rule-classes :congruence)