Make an svar for a name under a single scope level, e.g. foo.bar
(make-scoped-svar scope name) → var
Function:
(defun make-scoped-svar (scope name) (declare (xargs :guard (and (name-p scope) (name-p name)))) (let ((__function__ 'make-scoped-svar)) (declare (ignorable __function__)) (address->svar (make-address :path (make-path-scope :namespace scope :subpath (make-path-wire :name name))))))
Theorem:
(defthm return-type-of-make-scoped-svar (b* ((var (make-scoped-svar scope name))) (and (svar-p var) (svar-addr-p var))) :rule-classes :rewrite)
Theorem:
(defthm make-scoped-svar-of-name-fix-scope (equal (make-scoped-svar (name-fix scope) name) (make-scoped-svar scope name)))
Theorem:
(defthm make-scoped-svar-name-equiv-congruence-on-scope (implies (name-equiv scope scope-equiv) (equal (make-scoped-svar scope name) (make-scoped-svar scope-equiv name))) :rule-classes :congruence)
Theorem:
(defthm make-scoped-svar-of-name-fix-name (equal (make-scoped-svar scope (name-fix name)) (make-scoped-svar scope name)))
Theorem:
(defthm make-scoped-svar-name-equiv-congruence-on-name (implies (name-equiv name name-equiv) (equal (make-scoped-svar scope name) (make-scoped-svar scope name-equiv))) :rule-classes :congruence)