Pop the current scope off of the lexical scope stack and free fast alists.
(vl-lexscopes-exit-scope scopes) → scopes
This should be called when exiting a module, function, block, etc.
Function:
(defun vl-lexscopes-exit-scope (scopes) (declare (xargs :guard (vl-lexscopes-p scopes))) (let ((__function__ 'vl-lexscopes-exit-scope)) (declare (ignorable __function__)) (b* ((scopes (vl-lexscopes-fix scopes)) ((when (atom scopes)) (raise "Expected at least one lexscope.")) ((cons head tail) scopes)) (fast-alist-free head) tail)))
Theorem:
(defthm vl-lexscopes-p-of-vl-lexscopes-exit-scope (b* ((scopes (vl-lexscopes-exit-scope scopes))) (vl-lexscopes-p scopes)) :rule-classes :rewrite)
Theorem:
(defthm vl-lexscopes-exit-scope-of-vl-lexscopes-fix-scopes (equal (vl-lexscopes-exit-scope (vl-lexscopes-fix scopes)) (vl-lexscopes-exit-scope scopes)))
Theorem:
(defthm vl-lexscopes-exit-scope-vl-lexscopes-equiv-congruence-on-scopes (implies (vl-lexscopes-equiv scopes scopes-equiv) (equal (vl-lexscopes-exit-scope scopes) (vl-lexscopes-exit-scope scopes-equiv))) :rule-classes :congruence)