(apply-comb-transforms aignet aignet2 transforms output-ranges state) → (mv new-aignet2 new-output-ranges new-state)
Function:
(defun apply-comb-transforms (aignet aignet2 transforms output-ranges state) (declare (xargs :stobjs (aignet aignet2 state))) (declare (xargs :guard (aignet-output-range-map-p output-ranges))) (declare (xargs :guard t)) (let ((__function__ 'apply-comb-transforms)) (declare (ignorable __function__)) (prog2$ (print-aignet-stats "Input" aignet) (time$ (b* (((unless (consp transforms)) (b* ((aignet2 (aignet-raw-copy aignet aignet2))) (mv aignet2 (aignet-output-range-map-fix output-ranges) state)))) (mbe :logic (non-exec (apply-comb-transforms!-core aignet transforms output-ranges state)) :exec (b* (((mv aignet2 output-ranges state) (apply-comb-transform aignet aignet2 (car transforms) output-ranges state)) ((local-stobjs aignet3) (mv aignet2 aignet3 output-ranges state))) (apply-comb-transforms-in-place aignet2 aignet3 (cdr transforms) output-ranges state)))) :msg "All transforms: ~st seconds, ~sa bytes.~%"))))
Theorem:
(defthm aignet-output-range-map-p-of-apply-comb-transforms.new-output-ranges (b* (((mv ?new-aignet2 ?new-output-ranges ?new-state) (apply-comb-transforms aignet aignet2 transforms output-ranges state))) (aignet-output-range-map-p new-output-ranges)) :rule-classes :rewrite)
Theorem:
(defthm normalize-inputs-of-apply-comb-transforms (b* nil (implies (syntaxp (not (equal aignet2 ''nil))) (equal (apply-comb-transforms aignet aignet2 transforms output-ranges state) (let ((aignet2 nil)) (apply-comb-transforms aignet aignet2 transforms output-ranges state))))))
Theorem:
(defthm num-ins-of-apply-comb-transforms (b* (((mv ?new-aignet2 ?new-output-ranges ?new-state) (apply-comb-transforms aignet aignet2 transforms output-ranges state))) (equal (stype-count :pi new-aignet2) (stype-count :pi aignet))))
Theorem:
(defthm num-outs-lower-bound-of-apply-comb-transforms (b* (((mv ?new-aignet2 ?new-output-ranges ?new-state) (apply-comb-transforms aignet aignet2 transforms output-ranges state))) (implies (<= (aignet-output-range-map-length output-ranges) (stype-count :po aignet)) (<= (aignet-output-range-map-length new-output-ranges) (stype-count :po new-aignet2)))) :rule-classes ((:linear :trigger-terms ((stype-count :po (mv-nth 0 (apply-comb-transforms aignet aignet2 transforms output-ranges state))) (aignet-output-range-map-length (mv-nth 1 (apply-comb-transforms aignet aignet2 transforms output-ranges state)))))))
Theorem:
(defthm apply-comb-transforms-comb-equiv (b* (((mv ?new-aignet2 ?new-output-ranges ?new-state) (apply-comb-transforms aignet aignet2 transforms output-ranges state))) (comb-equiv new-aignet2 aignet)))
Theorem:
(defthm num-regs-of-apply-comb-transforms (b* (((mv ?new-aignet2 ?new-output-ranges ?new-state) (apply-comb-transforms aignet aignet2 transforms output-ranges state))) (equal (stype-count :reg new-aignet2) (stype-count :reg aignet))))
Theorem:
(defthm num-outs-of-apply-comb-transforms (b* (((mv ?new-aignet2 ?new-output-ranges ?new-state) (apply-comb-transforms aignet aignet2 transforms output-ranges state))) (equal (stype-count :po new-aignet2) (stype-count :po aignet))))
Theorem:
(defthm w-state-of-apply-comb-transforms (b* (((mv ?new-aignet2 ?new-output-ranges ?new-state) (apply-comb-transforms aignet aignet2 transforms output-ranges state))) (equal (w new-state) (w state))))
Theorem:
(defthm list-of-outputs-of-apply-comb-transforms (b* (((mv ?new-aignet2 ?new-output-ranges ?new-state) (apply-comb-transforms aignet aignet2 transforms output-ranges state))) (equal (list new-aignet2 new-output-ranges new-state) (apply-comb-transforms aignet aignet2 transforms output-ranges state))))