Create the assignments for AIG constant and variable nodes.
(aig2c-prologue input-init tempmap config code) → new-code
Function:
(defun aig2c-prologue (input-init tempmap config code) (declare (xargs :guard (and (string-listp (alist-vals input-init)) (string-listp (alist-vals tempmap)) (aig2c-config-p config) (character-listp code)))) (let ((__function__ 'aig2c-prologue)) (declare (ignorable __function__)) (b* (((when (atom input-init)) code) ((when (atom (car input-init))) (aig2c-prologue (cdr input-init) tempmap config code)) (var (caar input-init)) (c-rhs (cdar input-init)) (c-lhs (cdr (hons-get var tempmap))) ((unless c-lhs) (aig2c-prologue (cdr input-init) tempmap config code)) (code (str::revappend-chars " " code)) (code (str::revappend-chars (aig2c-config->type config) code)) (code (str::revappend-chars " " code)) (code (str::revappend-chars c-lhs code)) (code (str::revappend-chars " = " code)) (code (str::revappend-chars c-rhs code)) (code (list* #\Newline #\; code))) (aig2c-prologue (cdr input-init) tempmap config code))))
Theorem:
(defthm character-listp-of-aig2c-prologue (implies (force (character-listp code)) (b* ((new-code (aig2c-prologue input-init tempmap config code))) (character-listp new-code))) :rule-classes :rewrite)