Turns a seltrace object into an svex path.
(vl-seltrace-to-path x path) → new-path
Note: This isn't the end of the story; we still need to deal with e.g. bitselects, partselects, and nonconstant array selects.
Function:
(defun vl-seltrace-to-path (x path) (declare (xargs :guard (and (vl-seltrace-p x) (or (not path) (sv::path-p path))))) (declare (xargs :guard (equal (vl-seltrace-unres-count x) 0))) (let ((__function__ 'vl-seltrace-to-path)) (declare (ignorable __function__)) (b* (((when (atom x)) (and path (sv::path-fix path))) (path1 (if path (sv::make-path-scope :namespace (vl-selstep->svex-name (car x)) :subpath path) (sv::make-path-wire :name (vl-selstep->svex-name (car x)))))) (vl-seltrace-add-to-path (cdr x) path1))))
Theorem:
(defthm return-type-of-vl-seltrace-to-path (b* ((new-path (vl-seltrace-to-path x path))) (implies new-path (sv::path-p new-path))) :rule-classes :rewrite)
Theorem:
(defthm vl-seltrace-to-path-of-vl-seltrace-fix-x (equal (vl-seltrace-to-path (vl-seltrace-fix x) path) (vl-seltrace-to-path x path)))
Theorem:
(defthm vl-seltrace-to-path-vl-seltrace-equiv-congruence-on-x (implies (vl-seltrace-equiv x x-equiv) (equal (vl-seltrace-to-path x path) (vl-seltrace-to-path x-equiv path))) :rule-classes :congruence)