Combine constprop and observability-fix for a transform that is sometimes somewhat better than simply running both in sequence.
(obs-constprop aignet aignet2 config state) → (mv new-aignet2 new-state)
Function:
(defun obs-constprop (aignet aignet2 config state) (declare (xargs :stobjs (aignet aignet2 state))) (declare (xargs :guard (obs-constprop-config-p config))) (let ((__function__ 'obs-constprop)) (declare (ignorable __function__)) (b* (((local-stobjs aignet-tmp) (mv aignet2 state aignet-tmp)) ((mv aignet-tmp state) (obs-constprop-core aignet aignet-tmp config state)) (aignet2 (aignet-prune-comb aignet-tmp aignet2 (obs-constprop-config->gatesimp config)))) (mv aignet2 state aignet-tmp))))
Theorem:
(defthm num-ins-of-obs-constprop (b* (((mv ?new-aignet2 ?new-state) (obs-constprop aignet aignet2 config state))) (equal (stype-count :pi new-aignet2) (stype-count :pi aignet))))
Theorem:
(defthm num-regs-of-obs-constprop (b* (((mv ?new-aignet2 ?new-state) (obs-constprop aignet aignet2 config state))) (equal (stype-count :reg new-aignet2) (stype-count :reg aignet))))
Theorem:
(defthm num-outs-of-obs-constprop (b* (((mv ?new-aignet2 ?new-state) (obs-constprop aignet aignet2 config state))) (equal (stype-count :po new-aignet2) (stype-count :po aignet))))
Theorem:
(defthm obs-constprop-comb-equivalent (b* (((mv ?new-aignet2 ?new-state) (obs-constprop aignet aignet2 config state))) (comb-equiv new-aignet2 aignet)))
Theorem:
(defthm normalize-inputs-of-obs-constprop (b* nil (implies (syntaxp (not (equal aignet2 ''nil))) (equal (obs-constprop aignet aignet2 config state) (let ((aignet2 nil)) (obs-constprop aignet aignet2 config state))))))
Theorem:
(defthm w-state-of-obs-constprop (b* (((mv ?new-aignet2 ?new-state) (obs-constprop aignet aignet2 config state))) (equal (w new-state) (w state))))
Theorem:
(defthm obs-constprop-of-node-list-fix-aignet (equal (obs-constprop (node-list-fix aignet) aignet2 config state) (obs-constprop aignet aignet2 config state)))
Theorem:
(defthm obs-constprop-node-list-equiv-congruence-on-aignet (implies (node-list-equiv aignet aignet-equiv) (equal (obs-constprop aignet aignet2 config state) (obs-constprop aignet-equiv aignet2 config state))) :rule-classes :congruence)
Theorem:
(defthm obs-constprop-of-node-list-fix-aignet2 (equal (obs-constprop aignet (node-list-fix aignet2) config state) (obs-constprop aignet aignet2 config state)))
Theorem:
(defthm obs-constprop-node-list-equiv-congruence-on-aignet2 (implies (node-list-equiv aignet2 aignet2-equiv) (equal (obs-constprop aignet aignet2 config state) (obs-constprop aignet aignet2-equiv config state))) :rule-classes :congruence)
Theorem:
(defthm obs-constprop-of-obs-constprop-config-fix-config (equal (obs-constprop aignet aignet2 (obs-constprop-config-fix config) state) (obs-constprop aignet aignet2 config state)))
Theorem:
(defthm obs-constprop-obs-constprop-config-equiv-congruence-on-config (implies (obs-constprop-config-equiv config config-equiv) (equal (obs-constprop aignet aignet2 config state) (obs-constprop aignet aignet2 config-equiv state))) :rule-classes :congruence)