(vl-scope-finalize-params formals actuals warnings elabindex outer-ss outer-scope-path &key (config 'config)) → (mv successp warnings elabindex final-paramdecls)
Function:
(defun vl-scope-finalize-params-fn (formals actuals warnings elabindex outer-ss outer-scope-path config) (declare (xargs :stobjs (elabindex))) (declare (xargs :guard (and (vl-paramdecllist-p formals) (vl-paramargs-p actuals) (vl-warninglist-p warnings) (vl-scopestack-p outer-ss) (vl-elabtraversal-p outer-scope-path) (vl-simpconfig-p config)))) (let ((__function__ 'vl-scope-finalize-params)) (declare (ignorable __function__)) (b* (((mv ok warnings overrides) (vl-make-paramdecloverrides formals actuals (vl-simpconfig->unparam-bad-instance-fatalp config) warnings)) ((unless ok) (mv nil warnings elabindex nil)) (mod-ss (vl-elabindex->ss)) ((mv err mod-scope no-mod-ss) (vl-scopestack-case mod-ss :local (mv nil mod-ss.top mod-ss.super) :global (mv nil mod-ss.design (vl-scopestack-null)) :null (mv t nil nil))) ((when err) (mv nil (fatal :type :vl-programming-error :msg "Empty scopestack -- expected at least the design scope") elabindex nil)) (elabindex (vl-elabindex-update-ss no-mod-ss elabindex)) (scopeinfo (vl-scope->scopeinfo mod-scope (vl-scopestack->design mod-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 final-paramdecls elabindex) (vl-scopeinfo-resolve-params overrides scopeinfo-with-empty-params elabindex outer-ss outer-scope-path nil warnings))) (mv ok warnings elabindex final-paramdecls))))
Theorem:
(defthm vl-warninglist-p-of-vl-scope-finalize-params.warnings (b* (((mv ?successp ?warnings ?elabindex ?final-paramdecls) (vl-scope-finalize-params-fn formals actuals warnings elabindex outer-ss outer-scope-path config))) (vl-warninglist-p warnings)) :rule-classes :rewrite)
Theorem:
(defthm vl-paramdecllist-p-of-vl-scope-finalize-params.final-paramdecls (b* (((mv ?successp ?warnings ?elabindex ?final-paramdecls) (vl-scope-finalize-params-fn formals actuals warnings elabindex outer-ss outer-scope-path config))) (vl-paramdecllist-p final-paramdecls)) :rule-classes :rewrite)
Theorem:
(defthm vl-scope-finalize-params-fn-of-vl-paramdecllist-fix-formals (equal (vl-scope-finalize-params-fn (vl-paramdecllist-fix formals) actuals warnings elabindex outer-ss outer-scope-path config) (vl-scope-finalize-params-fn formals actuals warnings elabindex outer-ss outer-scope-path config)))
Theorem:
(defthm vl-scope-finalize-params-fn-vl-paramdecllist-equiv-congruence-on-formals (implies (vl-paramdecllist-equiv formals formals-equiv) (equal (vl-scope-finalize-params-fn formals actuals warnings elabindex outer-ss outer-scope-path config) (vl-scope-finalize-params-fn formals-equiv actuals warnings elabindex outer-ss outer-scope-path config))) :rule-classes :congruence)
Theorem:
(defthm vl-scope-finalize-params-fn-of-vl-paramargs-fix-actuals (equal (vl-scope-finalize-params-fn formals (vl-paramargs-fix actuals) warnings elabindex outer-ss outer-scope-path config) (vl-scope-finalize-params-fn formals actuals warnings elabindex outer-ss outer-scope-path config)))
Theorem:
(defthm vl-scope-finalize-params-fn-vl-paramargs-equiv-congruence-on-actuals (implies (vl-paramargs-equiv actuals actuals-equiv) (equal (vl-scope-finalize-params-fn formals actuals warnings elabindex outer-ss outer-scope-path config) (vl-scope-finalize-params-fn formals actuals-equiv warnings elabindex outer-ss outer-scope-path config))) :rule-classes :congruence)
Theorem:
(defthm vl-scope-finalize-params-fn-of-vl-warninglist-fix-warnings (equal (vl-scope-finalize-params-fn formals actuals (vl-warninglist-fix warnings) elabindex outer-ss outer-scope-path config) (vl-scope-finalize-params-fn formals actuals warnings elabindex outer-ss outer-scope-path config)))
Theorem:
(defthm vl-scope-finalize-params-fn-vl-warninglist-equiv-congruence-on-warnings (implies (vl-warninglist-equiv warnings warnings-equiv) (equal (vl-scope-finalize-params-fn formals actuals warnings elabindex outer-ss outer-scope-path config) (vl-scope-finalize-params-fn formals actuals warnings-equiv elabindex outer-ss outer-scope-path config))) :rule-classes :congruence)
Theorem:
(defthm vl-scope-finalize-params-fn-of-vl-scopestack-fix-outer-ss (equal (vl-scope-finalize-params-fn formals actuals warnings elabindex (vl-scopestack-fix outer-ss) outer-scope-path config) (vl-scope-finalize-params-fn formals actuals warnings elabindex outer-ss outer-scope-path config)))
Theorem:
(defthm vl-scope-finalize-params-fn-vl-scopestack-equiv-congruence-on-outer-ss (implies (vl-scopestack-equiv outer-ss outer-ss-equiv) (equal (vl-scope-finalize-params-fn formals actuals warnings elabindex outer-ss outer-scope-path config) (vl-scope-finalize-params-fn formals actuals warnings elabindex outer-ss-equiv outer-scope-path config))) :rule-classes :congruence)
Theorem:
(defthm vl-scope-finalize-params-fn-of-vl-elabtraversal-fix-outer-scope-path (equal (vl-scope-finalize-params-fn formals actuals warnings elabindex outer-ss (vl-elabtraversal-fix outer-scope-path) config) (vl-scope-finalize-params-fn formals actuals warnings elabindex outer-ss outer-scope-path config)))
Theorem:
(defthm vl-scope-finalize-params-fn-vl-elabtraversal-equiv-congruence-on-outer-scope-path (implies (vl-elabtraversal-equiv outer-scope-path outer-scope-path-equiv) (equal (vl-scope-finalize-params-fn formals actuals warnings elabindex outer-ss outer-scope-path config) (vl-scope-finalize-params-fn formals actuals warnings elabindex outer-ss outer-scope-path-equiv config))) :rule-classes :congruence)
Theorem:
(defthm vl-scope-finalize-params-fn-of-vl-simpconfig-fix-config (equal (vl-scope-finalize-params-fn formals actuals warnings elabindex outer-ss outer-scope-path (vl-simpconfig-fix config)) (vl-scope-finalize-params-fn formals actuals warnings elabindex outer-ss outer-scope-path config)))
Theorem:
(defthm vl-scope-finalize-params-fn-vl-simpconfig-equiv-congruence-on-config (implies (vl-simpconfig-equiv config config-equiv) (equal (vl-scope-finalize-params-fn formals actuals warnings elabindex outer-ss outer-scope-path config) (vl-scope-finalize-params-fn formals actuals warnings elabindex outer-ss outer-scope-path config-equiv))) :rule-classes :congruence)