Remove warnings of certain types.
(vl-remove-warnings types x) → ans
This can be useful to filter out mundane warnings that you do not want to bother the user with.
Function:
(defun vl-remove-warnings (types x) (declare (xargs :guard (and (symbol-listp types) (vl-warninglist-p x)))) (let ((__function__ 'vl-remove-warnings)) (declare (ignorable __function__)) (cond ((atom x) nil) ((member (vl-warning->type (car x)) (acl2::symbol-list-fix types)) (vl-remove-warnings types (cdr x))) (t (cons (vl-warning-fix (car x)) (vl-remove-warnings types (cdr x)))))))
Theorem:
(defthm vl-warninglist-p-of-vl-remove-warnings (b* ((ans (vl-remove-warnings types x))) (vl-warninglist-p ans)) :rule-classes :rewrite)
Theorem:
(defthm vl-remove-warnings-of-symbol-list-fix-types (equal (vl-remove-warnings (acl2::symbol-list-fix types) x) (vl-remove-warnings types x)))
Theorem:
(defthm vl-remove-warnings-symbol-list-equiv-congruence-on-types (implies (acl2::symbol-list-equiv types types-equiv) (equal (vl-remove-warnings types x) (vl-remove-warnings types-equiv x))) :rule-classes :congruence)
Theorem:
(defthm vl-remove-warnings-of-vl-warninglist-fix-x (equal (vl-remove-warnings types (vl-warninglist-fix x)) (vl-remove-warnings types x)))
Theorem:
(defthm vl-remove-warnings-vl-warninglist-equiv-congruence-on-x (implies (vl-warninglist-equiv x x-equiv) (equal (vl-remove-warnings types x) (vl-remove-warnings types x-equiv))) :rule-classes :congruence)