Like prune, but overwrites the original network instead of returning a new one.
(prune! aignet config) → new-aignet
Function:
(defun prune! (aignet config) (declare (xargs :stobjs (aignet))) (declare (xargs :guard (prune-config-p config))) (let ((__function__ 'prune!)) (declare (ignorable __function__)) (b* (((local-stobjs aignet-tmp) (mv aignet aignet-tmp)) (aignet-tmp (aignet-raw-copy aignet aignet-tmp)) (aignet (aignet-prune-comb aignet-tmp aignet (prune-config->gatesimp config)))) (mv aignet aignet-tmp))))
Theorem:
(defthm num-ins-of-prune! (b* ((?new-aignet (prune! aignet config))) (equal (stype-count :pi new-aignet) (stype-count :pi aignet))))
Theorem:
(defthm num-regs-of-prune! (b* ((?new-aignet (prune! aignet config))) (equal (stype-count :reg new-aignet) (stype-count :reg aignet))))
Theorem:
(defthm num-outs-of-prune! (b* ((?new-aignet (prune! aignet config))) (equal (stype-count :po new-aignet) (stype-count :po aignet))))
Theorem:
(defthm prune!-comb-equivalent (b* ((?new-aignet (prune! aignet config))) (comb-equiv new-aignet aignet)))