Check if a call to defmapping is redundant.
(defmapping-check-redundancy name print show-only call ctx state) → (mv erp yes/no state)
If the defmapping table has no entry for
If the table has an entry for
If the call is redundant,
we know that all the inputs except possibly
Function:
(defun defmapping-check-redundancy (name print show-only call ctx state) (declare (xargs :stobjs (state))) (declare (xargs :guard (pseudo-event-formp call))) (let ((__function__ 'defmapping-check-redundancy)) (declare (ignorable __function__)) (b* ((table (table-alist *defmapping-table-name* (w state)) ) (pair (assoc-equal name table)) ((unless pair) (value nil)) (info (cdr pair)) (call$ (defmapping-filter-call call)) ((unless (equal call$ (defmapping-info->call$ info))) (er-soft+ ctx t nil "A different call to DEFMAPPING with name ~x0 ~ has already been performed." name)) ((er &) (evmac-process-input-print print ctx state)) ((er &) (evmac-process-input-show-only show-only ctx state)) ((run-when show-only) (cw "~x0~|" (defmapping-info->expansion info))) ((run-when print) (cw "~%The call ~x0 is redundant.~%" call))) (value t))))