Split off the rightmost part of a hierarchical scope expression.
(vl-scopeexpr-split-right x) → (mv successp prefix indices lastname)
This is a thin wrapper around vl-hidexpr-split-right that just sticks the scopes back on.
Function:
(defun vl-scopeexpr-split-right (x) (declare (xargs :guard (vl-scopeexpr-p x))) (let ((__function__ 'vl-scopeexpr-split-right)) (declare (ignorable __function__)) (vl-scopeexpr-case x :end (b* (((mv okp new-hid indices lastname) (vl-hidexpr-split-right x.hid)) (new-x (change-vl-scopeexpr-end x :hid new-hid))) (mv okp new-x indices lastname)) :colon (b* (((mv okp new-rest indices lastname) (vl-scopeexpr-split-right x.rest)) (new-x (change-vl-scopeexpr-colon x :rest new-rest))) (mv okp new-x indices lastname)))))
Theorem:
(defthm booleanp-of-vl-scopeexpr-split-right.successp (b* (((mv ?successp ?prefix ?indices ?lastname) (vl-scopeexpr-split-right x))) (booleanp successp)) :rule-classes :rewrite)
Theorem:
(defthm vl-scopeexpr-p-of-vl-scopeexpr-split-right.prefix (b* (((mv ?successp ?prefix ?indices ?lastname) (vl-scopeexpr-split-right x))) (vl-scopeexpr-p prefix)) :rule-classes :rewrite)
Theorem:
(defthm vl-exprlist-p-of-vl-scopeexpr-split-right.indices (b* (((mv ?successp ?prefix ?indices ?lastname) (vl-scopeexpr-split-right x))) (vl-exprlist-p indices)) :rule-classes :rewrite)
Theorem:
(defthm stringp-of-vl-scopeexpr-split-right.lastname (b* (((mv ?successp ?prefix ?indices ?lastname) (vl-scopeexpr-split-right x))) (stringp lastname)) :rule-classes :rewrite)
Theorem:
(defthm vl-scopeexpr-split-right-of-vl-scopeexpr-fix-x (equal (vl-scopeexpr-split-right (vl-scopeexpr-fix x)) (vl-scopeexpr-split-right x)))
Theorem:
(defthm vl-scopeexpr-split-right-vl-scopeexpr-equiv-congruence-on-x (implies (vl-scopeexpr-equiv x x-equiv) (equal (vl-scopeexpr-split-right x) (vl-scopeexpr-split-right x-equiv))) :rule-classes :congruence)