Apply combinational pruning to remove unused nodes in the input network.
(prune aignet aignet2 config) → new-aignet2
Pruning simply marks the nodes that are in the fanin cones of the combinational outputs and selectively copies only those nodes (but including all combinational inputs). This transform is usually redundant because most transforms result in pruned networks. One use is to restore xor nodes after applying the abc-comb-simplify transform, since the aiger format used for translating between ABC and aignet does not support xors.
Function:
(defun prune (aignet aignet2 config) (declare (xargs :stobjs (aignet aignet2))) (declare (xargs :guard (prune-config-p config))) (let ((__function__ 'prune)) (declare (ignorable __function__)) (aignet-prune-comb aignet aignet2 (prune-config->gatesimp config))))
Theorem:
(defthm num-ins-of-prune (b* ((?new-aignet2 (prune aignet aignet2 config))) (equal (stype-count :pi new-aignet2) (stype-count :pi aignet))))
Theorem:
(defthm num-regs-of-prune (b* ((?new-aignet2 (prune aignet aignet2 config))) (equal (stype-count :reg new-aignet2) (stype-count :reg aignet))))
Theorem:
(defthm num-outs-of-prune (b* ((?new-aignet2 (prune aignet aignet2 config))) (equal (stype-count :po new-aignet2) (stype-count :po aignet))))
Theorem:
(defthm prune-comb-equivalent (b* ((?new-aignet2 (prune aignet aignet2 config))) (comb-equiv new-aignet2 aignet)))
Theorem:
(defthm normalize-input-of-prune (implies (syntaxp (not (equal aignet2 ''nil))) (equal (prune aignet aignet2 config) (prune aignet nil config))))