Check if a call of defarbrec is redundant.
(defarbrec-check-redundancy fn print show-only call ctx state) → (mv erp yes/no state)
If the defarbrec 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 defarbrec-check-redundancy (fn print show-only call ctx state) (declare (xargs :stobjs (state))) (declare (xargs :guard (pseudo-event-formp call))) (let ((__function__ 'defarbrec-check-redundancy)) (declare (ignorable __function__)) (b* ((table (table-alist *defarbrec-table-name* (w state)) ) (pair (assoc-equal fn table)) ((unless pair) (value nil)) (info (cdr pair)) (call$ (defarbrec-filter-call call)) ((unless (equal call$ (defarbrec-info->call$ info))) (er-soft+ ctx t nil "The function ~x0 has already been defined ~ by a different call of DEFARBREC." fn)) ((er &) (defarbrec-process-print print ctx state)) ((er &) (defarbrec-process-show-only show-only ctx state)) ((run-when show-only) (cw "~x0~|" (defarbrec-info->expansion info))) ((run-when print) (cw "~%The call ~x0 is redundant.~%" call))) (value t))))