Add a warning to a delta.
(vl-warn-delta warning &key (delta 'delta)) → delta
Usually you will want to use dwarn instead because it allows
you to construct the warning inline. But, occasionally, the warning to add has
already been constructed, in which case
Function:
(defun vl-warn-delta-fn (warning delta) (declare (xargs :guard (and (vl-warning-p warning) (vl-delta-p delta)))) (let ((__function__ 'vl-warn-delta)) (declare (ignorable __function__)) (change-vl-delta delta :warnings (cons (vl-warning-fix warning) (vl-delta->warnings delta)))))
Theorem:
(defthm vl-delta-p-of-vl-warn-delta (b* ((delta (vl-warn-delta-fn warning delta))) (vl-delta-p delta)) :rule-classes :rewrite)
Theorem:
(defthm vl-warn-delta-fn-of-vl-warning-fix-warning (equal (vl-warn-delta-fn (vl-warning-fix warning) delta) (vl-warn-delta-fn warning delta)))
Theorem:
(defthm vl-warn-delta-fn-vl-warning-equiv-congruence-on-warning (implies (vl-warning-equiv warning warning-equiv) (equal (vl-warn-delta-fn warning delta) (vl-warn-delta-fn warning-equiv delta))) :rule-classes :congruence)
Theorem:
(defthm vl-warn-delta-fn-of-vl-delta-fix-delta (equal (vl-warn-delta-fn warning (vl-delta-fix delta)) (vl-warn-delta-fn warning delta)))
Theorem:
(defthm vl-warn-delta-fn-vl-delta-equiv-congruence-on-delta (implies (vl-delta-equiv delta delta-equiv) (equal (vl-warn-delta-fn warning delta) (vl-warn-delta-fn warning delta-equiv))) :rule-classes :congruence)