(svar-indexed->named-memo x scope moddb indnamememo) → (mv xx indnamememo1)
Function:
(defun svar-indexed->named-memo (x scope moddb indnamememo) (declare (xargs :stobjs (moddb indnamememo))) (declare (xargs :guard (and (svar-p x) (modscope-p scope) (moddb-ok moddb)))) (declare (xargs :guard (and (modscope-okp scope moddb) (svar-boundedp x (modscope-local-bound scope moddb))))) (let ((__function__ 'svar-indexed->named-memo)) (declare (ignorable __function__)) (b* ((idx (lnfix (svar-index x))) (in-bounds (< idx (indnames-length indnamememo))) (look (and in-bounds (get-indname idx indnamememo))) ((when (and look (svar-addr-p (indname-result->varname look)))) (mv (indname-result->varname look) indnamememo)) ((mv name wire) (moddb-wireidx->path/decl idx (modscope->modidx scope) moddb)) (res (address->svar (make-address :path name))) (indnamememo (if in-bounds (set-indname idx (make-indname-result :varname res :decl wire) indnamememo) indnamememo))) (mv res indnamememo))))
Theorem:
(defthm return-type-of-svar-indexed->named-memo.xx (b* (((mv ?xx ?indnamememo1) (svar-indexed->named-memo x scope moddb indnamememo))) (and (svar-p xx) (svar-addr-p xx))) :rule-classes :rewrite)
Theorem:
(defthm return-type-of-svar-indexed->named-memo.indnamememo1 (b* (((mv ?xx ?indnamememo1) (svar-indexed->named-memo x scope moddb indnamememo))) (equal (len indnamememo1) (len indnamememo))) :rule-classes :rewrite)
Theorem:
(defthm svar-indexed->named-memo-of-svar-fix-x (equal (svar-indexed->named-memo (svar-fix x) scope moddb indnamememo) (svar-indexed->named-memo x scope moddb indnamememo)))
Theorem:
(defthm svar-indexed->named-memo-svar-equiv-congruence-on-x (implies (svar-equiv x x-equiv) (equal (svar-indexed->named-memo x scope moddb indnamememo) (svar-indexed->named-memo x-equiv scope moddb indnamememo))) :rule-classes :congruence)
Theorem:
(defthm svar-indexed->named-memo-of-modscope-fix-scope (equal (svar-indexed->named-memo x (modscope-fix scope) moddb indnamememo) (svar-indexed->named-memo x scope moddb indnamememo)))
Theorem:
(defthm svar-indexed->named-memo-modscope-equiv-congruence-on-scope (implies (modscope-equiv scope scope-equiv) (equal (svar-indexed->named-memo x scope moddb indnamememo) (svar-indexed->named-memo x scope-equiv moddb indnamememo))) :rule-classes :congruence)
Theorem:
(defthm svar-indexed->named-memo-of-moddb-fix-moddb (equal (svar-indexed->named-memo x scope (moddb-fix moddb) indnamememo) (svar-indexed->named-memo x scope moddb indnamememo)))
Theorem:
(defthm svar-indexed->named-memo-moddb-equiv-congruence-on-moddb (implies (moddb-equiv moddb moddb-equiv) (equal (svar-indexed->named-memo x scope moddb indnamememo) (svar-indexed->named-memo x scope moddb-equiv indnamememo))) :rule-classes :congruence)