Returns the reversed traversal necessary to get to the current scope from the top-level design.
(vl-elabscopes->elabtraversal x) → path
Function:
(defun vl-elabscopes->elabtraversal (x) (declare (xargs :guard (vl-elabscopes-p x))) (let ((__function__ 'vl-elabscopes->elabtraversal)) (declare (ignorable __function__)) (b* ((x (vl-elabscopes-fix x))) (if (or (atom x) (atom (cdr x))) (list (vl-elabinstruction-root)) (cons (if (caar x) (vl-elabinstruction-push-named (caar x)) (vl-elabinstruction-push-anon (cdar x))) (vl-elabscopes->elabtraversal (cdr x)))))))
Theorem:
(defthm vl-elabtraversal-p-of-vl-elabscopes->elabtraversal (b* ((path (vl-elabscopes->elabtraversal x))) (vl-elabtraversal-p path)) :rule-classes :rewrite)
Theorem:
(defthm vl-elabscopes->elabtraversal-of-vl-elabscopes-fix-x (equal (vl-elabscopes->elabtraversal (vl-elabscopes-fix x)) (vl-elabscopes->elabtraversal x)))
Theorem:
(defthm vl-elabscopes->elabtraversal-vl-elabscopes-equiv-congruence-on-x (implies (vl-elabscopes-equiv x x-equiv) (equal (vl-elabscopes->elabtraversal x) (vl-elabscopes->elabtraversal x-equiv))) :rule-classes :congruence)