Assign unique numbers (labels) to the nodes of an AIG.
(aig-label-nodes x free map) → (mv free map)
Function:
(defun aig-label-nodes (x free map) (declare (xargs :guard (natp free))) (let ((__function__ 'aig-label-nodes)) (declare (ignorable __function__)) (b* (((when (atom x)) (mv (lnfix free) map)) ((when (hons-get x map)) (mv (lnfix free) map)) ((mv free map) (aig-label-nodes (car x) free map)) ((mv free map) (aig-label-nodes (cdr x) free map)) (map (hons-acons x free map)) (free (+ 1 free))) (mv free map))))
Theorem:
(defthm natp-of-aig-label-nodes.free (b* (((mv ?free common-lisp::?map) (aig-label-nodes x free map))) (natp free)) :rule-classes :type-prescription)