(svex-normalize-assigns assigns fixups constraints var-decls aliases) → (mv res-assigns res-delays res-constraints)
Function:
(defun svex-normalize-assigns (assigns fixups constraints var-decls aliases) (declare (xargs :stobjs (aliases))) (declare (xargs :guard (and (assigns-p assigns) (assigns-p fixups) (constraintlist-p constraints) (var-decl-map-p var-decls)))) (declare (xargs :guard (and (svarlist-boundedp (assigns-vars assigns) (aliass-length aliases)) (svarlist-boundedp (assigns-vars fixups) (aliass-length aliases)) (svarlist-boundedp (constraintlist-vars constraints) (aliass-length aliases))))) (let ((__function__ 'svex-normalize-assigns)) (declare (ignorable __function__)) (b* (((acl2::local-stobjs svexarr) (mv res-assigns res-delays res-constraints svexarr)) (svexarr (resize-svexs (aliass-length aliases) svexarr)) (svexarr (cwtime (lhsarr-to-svexarr 0 aliases svexarr))) (norm-assigns (cwtime (assigns-subst assigns aliases svexarr))) (norm-fixups (cwtime (assigns-subst fixups aliases svexarr))) (norm-constraints (cwtime (constraintlist-subst-from-svexarr constraints aliases svexarr))) (net-assigns (cwtime (assigns->segment-drivers norm-assigns))) (res-assigns (make-fast-alist (cwtime (segment-driver-map-resolve net-assigns)))) (final-fixups (assigns-compose norm-fixups res-assigns)) (final-assigns1 (fast-alist-free (fast-alist-clean (svex-apply-overrides (assigns-to-overrides final-fixups) res-assigns)))) (final-assigns (svex-alist-truncate-by-var-decls final-assigns1 var-decls nil)) (delayvars (svarlist-collect-delays (svexlist-collect-vars (svex-alist-vals res-assigns)))) (res-delays (delay-svarlist->delays delayvars)) (trunc-delays (fast-alist-clean (svar-map-truncate-by-var-decls res-delays var-decls nil)))) (mv final-assigns trunc-delays norm-constraints svexarr))))
Theorem:
(defthm svex-alist-p-of-svex-normalize-assigns.res-assigns (b* (((mv ?res-assigns ?res-delays ?res-constraints) (svex-normalize-assigns assigns fixups constraints var-decls aliases))) (svex-alist-p res-assigns)) :rule-classes :rewrite)
Theorem:
(defthm svex-alist-p-of-svex-normalize-assigns.res-delays (b* (((mv ?res-assigns ?res-delays ?res-constraints) (svex-normalize-assigns assigns fixups constraints var-decls aliases))) (svex-alist-p res-delays)) :rule-classes :rewrite)
Theorem:
(defthm constraintlist-p-of-svex-normalize-assigns.res-constraints (b* (((mv ?res-assigns ?res-delays ?res-constraints) (svex-normalize-assigns assigns fixups constraints var-decls aliases))) (constraintlist-p res-constraints)) :rule-classes :rewrite)
Theorem:
(defthm svex-normalize-assigns-of-assigns-fix-assigns (equal (svex-normalize-assigns (assigns-fix assigns) fixups constraints var-decls aliases) (svex-normalize-assigns assigns fixups constraints var-decls aliases)))
Theorem:
(defthm svex-normalize-assigns-assigns-equiv-congruence-on-assigns (implies (assigns-equiv assigns assigns-equiv) (equal (svex-normalize-assigns assigns fixups constraints var-decls aliases) (svex-normalize-assigns assigns-equiv fixups constraints var-decls aliases))) :rule-classes :congruence)
Theorem:
(defthm svex-normalize-assigns-of-assigns-fix-fixups (equal (svex-normalize-assigns assigns (assigns-fix fixups) constraints var-decls aliases) (svex-normalize-assigns assigns fixups constraints var-decls aliases)))
Theorem:
(defthm svex-normalize-assigns-assigns-equiv-congruence-on-fixups (implies (assigns-equiv fixups fixups-equiv) (equal (svex-normalize-assigns assigns fixups constraints var-decls aliases) (svex-normalize-assigns assigns fixups-equiv constraints var-decls aliases))) :rule-classes :congruence)
Theorem:
(defthm svex-normalize-assigns-of-constraintlist-fix-constraints (equal (svex-normalize-assigns assigns fixups (constraintlist-fix constraints) var-decls aliases) (svex-normalize-assigns assigns fixups constraints var-decls aliases)))
Theorem:
(defthm svex-normalize-assigns-constraintlist-equiv-congruence-on-constraints (implies (constraintlist-equiv constraints constraints-equiv) (equal (svex-normalize-assigns assigns fixups constraints var-decls aliases) (svex-normalize-assigns assigns fixups constraints-equiv var-decls aliases))) :rule-classes :congruence)
Theorem:
(defthm svex-normalize-assigns-of-var-decl-map-fix-var-decls (equal (svex-normalize-assigns assigns fixups constraints (var-decl-map-fix var-decls) aliases) (svex-normalize-assigns assigns fixups constraints var-decls aliases)))
Theorem:
(defthm svex-normalize-assigns-var-decl-map-equiv-congruence-on-var-decls (implies (var-decl-map-equiv var-decls var-decls-equiv) (equal (svex-normalize-assigns assigns fixups constraints var-decls aliases) (svex-normalize-assigns assigns fixups constraints var-decls-equiv aliases))) :rule-classes :congruence)
Theorem:
(defthm svex-normalize-assigns-of-lhslist-fix-aliases (equal (svex-normalize-assigns assigns fixups constraints var-decls (lhslist-fix aliases)) (svex-normalize-assigns assigns fixups constraints var-decls aliases)))
Theorem:
(defthm svex-normalize-assigns-lhslist-equiv-congruence-on-aliases (implies (lhslist-equiv aliases aliases-equiv) (equal (svex-normalize-assigns assigns fixups constraints var-decls aliases) (svex-normalize-assigns assigns fixups constraints var-decls aliases-equiv))) :rule-classes :congruence)
Theorem:
(defthm vars-of-svex-normalize-assigns (b* (((mv ?res-assigns ?res-delays ?res-constraints) (svex-normalize-assigns assigns fixups constraints var-decls aliases))) (implies (svarlist-addr-p (aliases-vars aliases)) (svarlist-addr-p (svex-alist-vars res-assigns)))))
Theorem:
(defthm keys-of-svex-normalize-assigns (b* (((mv ?res-assigns ?res-delays ?res-constraints) (svex-normalize-assigns assigns fixups constraints var-decls aliases))) (implies (svarlist-addr-p (aliases-vars aliases)) (svarlist-addr-p (svex-alist-keys res-assigns)))))
Theorem:
(defthm vars-of-svex-normalize-assigns-delays (b* (((mv ?res-assigns ?res-delays ?res-constraints) (svex-normalize-assigns assigns fixups constraints var-decls aliases))) (implies (svarlist-addr-p (aliases-vars aliases)) (svarlist-addr-p (svex-alist-vars res-delays)))))
Theorem:
(defthm vars-of-svex-normalize-assigns-delays-keys (b* (((mv ?res-assigns ?res-delays ?res-constraints) (svex-normalize-assigns assigns fixups constraints var-decls aliases))) (implies (svarlist-addr-p (aliases-vars aliases)) (svarlist-addr-p (svex-alist-keys res-delays)))))
Theorem:
(defthm vars-of-svex-normalize-assigns-constraints (b* (((mv ?res-assigns ?res-delays ?res-constraints) (svex-normalize-assigns assigns fixups constraints var-decls aliases))) (implies (svarlist-addr-p (aliases-vars aliases)) (svarlist-addr-p (constraintlist-vars res-constraints)))))
Theorem:
(defthm no-duplicate-keys-of-svex-normalize-assigns-assigns (b* (((mv ?res-assigns ?res-delays ?res-constraints) (svex-normalize-assigns assigns fixups constraints var-decls aliases))) (no-duplicatesp-equal (svex-alist-keys res-assigns))))
Theorem:
(defthm no-duplicate-keys-of-svex-normalize-assigns-delays (b* (((mv ?res-assigns ?res-delays ?res-constraints) (svex-normalize-assigns assigns fixups constraints var-decls aliases))) (no-duplicatesp-equal (svex-alist-keys res-delays))))