Top-level function for propagating-errors. We identify any
faulty design elements in a
(vl-design-propagate-errors good bad) → (mv good-- bad++)
Function:
(defun vl-design-propagate-errors (good bad) (declare (xargs :guard (and (vl-design-p good) (vl-design-p bad)))) (let ((__function__ 'vl-design-propagate-errors)) (declare (ignorable __function__)) (b* ((zombies (vl-design-zombies good)) ((unless zombies) (mv (vl-design-fix good) (vl-design-fix bad))) (blame-alist (vl-blame-alist zombies good)) (reportcard (vl-blame-alist-to-reportcard blame-alist nil)) (good (vl-apply-reportcard good reportcard))) (vl-hierarchy-free) (vl-design-filter-zombies good bad))))
Theorem:
(defthm vl-design-p-of-vl-design-propagate-errors.good-- (b* (((mv ?good-- ?bad++) (vl-design-propagate-errors good bad))) (vl-design-p good--)) :rule-classes :rewrite)
Theorem:
(defthm vl-design-p-of-vl-design-propagate-errors.bad++ (b* (((mv ?good-- ?bad++) (vl-design-propagate-errors good bad))) (vl-design-p bad++)) :rule-classes :rewrite)
Theorem:
(defthm vl-design-propagate-errors-of-vl-design-fix-good (equal (vl-design-propagate-errors (vl-design-fix good) bad) (vl-design-propagate-errors good bad)))
Theorem:
(defthm vl-design-propagate-errors-vl-design-equiv-congruence-on-good (implies (vl-design-equiv good good-equiv) (equal (vl-design-propagate-errors good bad) (vl-design-propagate-errors good-equiv bad))) :rule-classes :congruence)
Theorem:
(defthm vl-design-propagate-errors-of-vl-design-fix-bad (equal (vl-design-propagate-errors good (vl-design-fix bad)) (vl-design-propagate-errors good bad)))
Theorem:
(defthm vl-design-propagate-errors-vl-design-equiv-congruence-on-bad (implies (vl-design-equiv bad bad-equiv) (equal (vl-design-propagate-errors good bad) (vl-design-propagate-errors good bad-equiv))) :rule-classes :congruence)