Transform an external declaration.
(split-fn-extdecl target-fn new-fn-name extdecl split-point) → (mv er target-found extdecls)
Function:
(defun split-fn-extdecl (target-fn new-fn-name extdecl split-point) (declare (xargs :guard (and (identp target-fn) (identp new-fn-name) (extdeclp extdecl) (natp split-point)))) (let ((__function__ 'split-fn-extdecl)) (declare (ignorable __function__)) (b* (((reterr) nil nil)) (extdecl-case extdecl :fundef (b* (((erp fundef1 fundef2) (split-fn-fundef target-fn new-fn-name extdecl.unwrap split-point))) (fundef-option-case fundef2 :some (retok t (list (extdecl-fundef fundef1) (extdecl-fundef fundef2.val))) :none (retok nil (list (extdecl-fundef fundef1))))) :decl (retok nil (list (extdecl-fix extdecl))) :empty (retok nil (list (extdecl-fix extdecl))) :asm (retok nil (list (extdecl-fix extdecl)))))))
Theorem:
(defthm booleanp-of-split-fn-extdecl.target-found (b* (((mv acl2::?er ?target-found ?extdecls) (split-fn-extdecl target-fn new-fn-name extdecl split-point))) (booleanp target-found)) :rule-classes :rewrite)
Theorem:
(defthm extdecl-listp-of-split-fn-extdecl.extdecls (b* (((mv acl2::?er ?target-found ?extdecls) (split-fn-extdecl target-fn new-fn-name extdecl split-point))) (extdecl-listp extdecls)) :rule-classes :rewrite)