Transform a list of external declarations.
(copy-fn-extdecl-list extdecls target-fn new-fn) → new-extdecls
Function:
(defun copy-fn-extdecl-list (extdecls target-fn new-fn) (declare (xargs :guard (and (extdecl-listp extdecls) (identp target-fn) (identp new-fn)))) (declare (xargs :guard (extdecl-list-annop extdecls))) (let ((__function__ 'copy-fn-extdecl-list)) (declare (ignorable __function__)) (b* (((when (endp extdecls)) nil) ((mv found new-extdecls) (copy-fn-extdecl (first extdecls) target-fn new-fn))) (append new-extdecls (if found (extdecl-list-fix (rest extdecls)) (copy-fn-extdecl-list (rest extdecls) target-fn new-fn))))))
Theorem:
(defthm extdecl-listp-of-copy-fn-extdecl-list (b* ((new-extdecls (copy-fn-extdecl-list extdecls target-fn new-fn))) (extdecl-listp new-extdecls)) :rule-classes :rewrite)