Given a wire address, find the corresponding wire declaration.
(moddb-address->wiredecl addr scope moddb) → wire
Function:
(defun moddb-address->wiredecl (addr scope moddb) (declare (xargs :stobjs (moddb))) (declare (xargs :guard (and (address-p addr) (modscope-p scope) (moddb-ok moddb)))) (declare (xargs :guard (modscope-okp scope moddb))) (let ((__function__ 'moddb-address->wiredecl)) (declare (ignorable __function__)) (b* (((address addr)) ((modscope scope1) (if (eq addr.scope :root) (modscope->top scope) (modscope->nth addr.scope scope))) (wire (moddb-path->wiredecl addr.path scope1.modidx moddb))) wire)))
Theorem:
(defthm return-type-of-moddb-address->wiredecl (b* ((wire (moddb-address->wiredecl addr scope moddb))) (iff (wire-p wire) wire)) :rule-classes :rewrite)
Theorem:
(defthm moddb-address->wiredecl-iff-wireidx (iff (moddb-address->wiredecl addr scope moddb) (moddb-address->wireidx addr scope moddb)))
Theorem:
(defthm moddb-address->wiredecl-of-address-fix-addr (equal (moddb-address->wiredecl (address-fix addr) scope moddb) (moddb-address->wiredecl addr scope moddb)))
Theorem:
(defthm moddb-address->wiredecl-address-equiv-congruence-on-addr (implies (address-equiv addr addr-equiv) (equal (moddb-address->wiredecl addr scope moddb) (moddb-address->wiredecl addr-equiv scope moddb))) :rule-classes :congruence)
Theorem:
(defthm moddb-address->wiredecl-of-modscope-fix-scope (equal (moddb-address->wiredecl addr (modscope-fix scope) moddb) (moddb-address->wiredecl addr scope moddb)))
Theorem:
(defthm moddb-address->wiredecl-modscope-equiv-congruence-on-scope (implies (modscope-equiv scope scope-equiv) (equal (moddb-address->wiredecl addr scope moddb) (moddb-address->wiredecl addr scope-equiv moddb))) :rule-classes :congruence)
Theorem:
(defthm moddb-address->wiredecl-of-moddb-fix-moddb (equal (moddb-address->wiredecl addr scope (moddb-fix moddb)) (moddb-address->wiredecl addr scope moddb)))
Theorem:
(defthm moddb-address->wiredecl-moddb-equiv-congruence-on-moddb (implies (moddb-equiv moddb moddb-equiv) (equal (moddb-address->wiredecl addr scope moddb) (moddb-address->wiredecl addr scope moddb-equiv))) :rule-classes :congruence)