(vl-normalize-scopestack x) → new-x
Function:
(defun vl-normalize-scopestack (x) (declare (xargs :guard (vl-scopestack-p x))) (let ((__function__ 'vl-normalize-scopestack)) (declare (ignorable __function__)) (b* ((x (vl-scopestack-fix x))) (vl-scopestack-case x :null x :global x :local (vl-scopestack-push (case (tag x.top) (:vl-module (vl-module->genblob x.top)) (:vl-interface (vl-interface->genblob x.top)) (otherwise x.top)) (vl-normalize-scopestack x.super))))))
Theorem:
(defthm vl-scopestack-p-of-vl-normalize-scopestack (b* ((new-x (vl-normalize-scopestack x))) (vl-scopestack-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-normalize-scopestack-of-vl-scopestack-fix-x (equal (vl-normalize-scopestack (vl-scopestack-fix x)) (vl-normalize-scopestack x)))
Theorem:
(defthm vl-normalize-scopestack-vl-scopestack-equiv-congruence-on-x (implies (vl-scopestack-equiv x x-equiv) (equal (vl-normalize-scopestack x) (vl-normalize-scopestack x-equiv))) :rule-classes :congruence)