Add a list of warnings to a (suitable) description.
(vl-description-add-warnings x warnings) → new-x
Function:
(defun vl-description-add-warnings (x warnings) (declare (xargs :guard (and (vl-description-p x) (vl-warninglist-p warnings)))) (declare (xargs :guard (vl-description-has-comments-p x))) (let ((__function__ 'vl-description-add-warnings)) (declare (ignorable __function__)) (b* ((x (vl-description-fix x)) (warnings (vl-warninglist-fix warnings))) (case (tag x) (:vl-module (change-vl-module x :warnings (append-without-guard warnings (vl-module->warnings x)))) (:vl-udp (change-vl-udp x :warnings (append-without-guard warnings (vl-udp->warnings x)))) (:vl-interface (change-vl-interface x :warnings (append-without-guard warnings (vl-interface->warnings x)))) (:vl-package (change-vl-package x :warnings (append-without-guard warnings (vl-package->warnings x)))) (:vl-program (change-vl-program x :warnings (append-without-guard warnings (vl-program->warnings x)))) (:vl-config (change-vl-config x :warnings (append-without-guard warnings (vl-config->warnings x)))) (:vl-typedef (change-vl-typedef x :warnings (append-without-guard warnings (vl-typedef->warnings x)))) (otherwise (progn$ (impossible) x))))))
Theorem:
(defthm vl-description-p-of-vl-description-add-warnings (b* ((new-x (vl-description-add-warnings x warnings))) (vl-description-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-description->name-of-vl-description-add-warnings (equal (vl-description->name (vl-description-add-warnings x warning)) (vl-description->name x)))
Theorem:
(defthm vl-description-add-warnings-of-vl-description-fix-x (equal (vl-description-add-warnings (vl-description-fix x) warnings) (vl-description-add-warnings x warnings)))
Theorem:
(defthm vl-description-add-warnings-vl-description-equiv-congruence-on-x (implies (vl-description-equiv x x-equiv) (equal (vl-description-add-warnings x warnings) (vl-description-add-warnings x-equiv warnings))) :rule-classes :congruence)
Theorem:
(defthm vl-description-add-warnings-of-vl-warninglist-fix-warnings (equal (vl-description-add-warnings x (vl-warninglist-fix warnings)) (vl-description-add-warnings x warnings)))
Theorem:
(defthm vl-description-add-warnings-vl-warninglist-equiv-congruence-on-warnings (implies (vl-warninglist-equiv warnings warnings-equiv) (equal (vl-description-add-warnings x warnings) (vl-description-add-warnings x warnings-equiv))) :rule-classes :congruence)