Create the assignments from AIG nodes to outputs.
(aig2c-epilogue aig-alist tempmap code) → new-code
Function:
(defun aig2c-epilogue (aig-alist tempmap code) (declare (xargs :guard (and (string-listp (alist-keys aig-alist)) (string-listp (alist-vals tempmap)) (character-listp code)))) (let ((__function__ 'aig2c-epilogue)) (declare (ignorable __function__)) (b* (((when (atom aig-alist)) code) ((when (atom (car aig-alist))) (aig2c-epilogue (cdr aig-alist) tempmap code)) ((cons c-out-name aig1) (car aig-alist)) (c-temp-name (cdr (hons-get aig1 tempmap))) ((unless c-temp-name) (raise "AIG not bound in tempmap!") code) (code (list* #\Space #\Space code)) (code (str::revappend-chars c-out-name code)) (code (list* #\Space #\= #\Space code)) (code (str::revappend-chars c-temp-name code)) (code (list* #\Newline #\; code))) (aig2c-epilogue (cdr aig-alist) tempmap code))))
Theorem:
(defthm character-listp-of-aig2c-epilogue (implies (force (character-listp code)) (b* ((new-code (aig2c-epilogue aig-alist tempmap code))) (character-listp new-code))) :rule-classes :rewrite)