(vl-description-set-comments x comments) → new-x
Function:
(defun vl-description-set-comments (x comments) (declare (xargs :guard (and (vl-description-p x) (vl-commentmap-p comments)))) (declare (xargs :guard (vl-description-has-comments-p x))) (let ((__function__ 'vl-description-set-comments)) (declare (ignorable __function__)) (b* ((x (vl-description-fix x))) (case (tag x) (:vl-module (change-vl-module x :comments comments)) (:vl-udp (change-vl-udp x :comments comments)) (:vl-interface (change-vl-interface x :comments comments)) (:vl-package (change-vl-package x :comments comments)) (:vl-program (change-vl-program x :comments comments)) (:vl-config (change-vl-config x :comments comments)) (:vl-typedef (change-vl-typedef x :comments comments)) (otherwise (progn$ (impossible) x))))))
Theorem:
(defthm vl-description-p-of-vl-description-set-comments (b* ((new-x (vl-description-set-comments x comments))) (vl-description-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-description->name-of-vl-description-set-comments (equal (vl-description->name (vl-description-set-comments x comments)) (vl-description->name x)))