Add a single warning to a vl-reportcard-p.
(vl-extend-reportcard name warning reportcard) → new-reportcard
Function:
(defun vl-extend-reportcard (name warning reportcard) (declare (xargs :guard (and (vl-reportcardkey-p name) (vl-warning-p warning) (vl-reportcard-p reportcard)))) (let ((__function__ 'vl-extend-reportcard)) (declare (ignorable __function__)) (b* ((name (vl-reportcardkey-fix name)) (warning (vl-warning-fix warning)) (reportcard (vl-reportcard-fix reportcard)) (old-warnings (cdr (hons-get name reportcard))) (new-warnings (cons warning old-warnings))) (hons-acons name new-warnings reportcard))))
Theorem:
(defthm vl-reportcard-p-of-vl-extend-reportcard (b* ((new-reportcard (vl-extend-reportcard name warning reportcard))) (vl-reportcard-p new-reportcard)) :rule-classes :rewrite)
Theorem:
(defthm vl-extend-reportcard-of-vl-reportcardkey-fix-name (equal (vl-extend-reportcard (vl-reportcardkey-fix name) warning reportcard) (vl-extend-reportcard name warning reportcard)))
Theorem:
(defthm vl-extend-reportcard-vl-reportcardkey-equiv-congruence-on-name (implies (vl-reportcardkey-equiv name name-equiv) (equal (vl-extend-reportcard name warning reportcard) (vl-extend-reportcard name-equiv warning reportcard))) :rule-classes :congruence)
Theorem:
(defthm vl-extend-reportcard-of-vl-warning-fix-warning (equal (vl-extend-reportcard name (vl-warning-fix warning) reportcard) (vl-extend-reportcard name warning reportcard)))
Theorem:
(defthm vl-extend-reportcard-vl-warning-equiv-congruence-on-warning (implies (vl-warning-equiv warning warning-equiv) (equal (vl-extend-reportcard name warning reportcard) (vl-extend-reportcard name warning-equiv reportcard))) :rule-classes :congruence)
Theorem:
(defthm vl-extend-reportcard-of-vl-reportcard-fix-reportcard (equal (vl-extend-reportcard name warning (vl-reportcard-fix reportcard)) (vl-extend-reportcard name warning reportcard)))
Theorem:
(defthm vl-extend-reportcard-vl-reportcard-equiv-congruence-on-reportcard (implies (vl-reportcard-equiv reportcard reportcard-equiv) (equal (vl-extend-reportcard name warning reportcard) (vl-extend-reportcard name warning reportcard-equiv))) :rule-classes :congruence)