Structure definition for the STV inputs.
(stv2c-ins-structdef stv acc) → new-acc
Function:
(defun stv2c-ins-structdef (stv acc) (declare (xargs :guard (processed-stv-p stv))) (let ((__function__ 'stv2c-ins-structdef)) (declare (ignorable __function__)) (b* ((ins (stv->ins stv)) (c-structname (stv2c-ins-structname stv)) (c-fieldnames (stv2c-c-symbol-names ins)) ((unless (uniquep c-fieldnames)) (raise "Name clash for STV input C names: ~x0." (duplicated-members c-fieldnames))) (acc (str::revappend-chars "class " acc)) (acc (str::revappend-chars c-structname acc)) (acc (cons #\Newline acc)) (acc (str::revappend-chars "{" acc)) (acc (cons #\Newline acc)) (acc (str::revappend-chars " public:" acc)) (acc (cons #\Newline acc)) (acc (stv2c-ins-structfields ins stv acc)) (acc (str::revappend-chars "};" acc)) (acc (cons #\Newline acc))) acc)))
Theorem:
(defthm character-listp-of-stv2c-ins-structdef (implies (character-listp acc) (b* ((new-acc (stv2c-ins-structdef stv acc))) (character-listp new-acc))) :rule-classes :rewrite)