Transform an external declaration.
(split-fn-ext-declon target-fn new-fn-name extdecl split-point) → (mv er? target-found extdecls)
Function:
(defun split-fn-ext-declon (target-fn new-fn-name extdecl split-point) (declare (xargs :guard (and (identp target-fn) (identp new-fn-name) (ext-declonp extdecl) (natp split-point)))) (b* (((reterr) nil nil)) (ext-declon-case extdecl :fundef (b* (((erp fundef1 fundef2) (split-fn-fundef target-fn new-fn-name extdecl.fundef split-point))) (fundef-option-case fundef2 :some (retok t (list (ext-declon-fundef fundef1) (ext-declon-fundef fundef2.val))) :none (retok nil (list (ext-declon-fundef fundef1))))) :declon (retok nil (list (ext-declon-fix extdecl))) :empty (retok nil (list (ext-declon-fix extdecl))) :asm (retok nil (list (ext-declon-fix extdecl))))))
Theorem:
(defthm maybe-msgp-of-split-fn-ext-declon.er? (b* (((mv ?er? ?target-found ?extdecls) (split-fn-ext-declon target-fn new-fn-name extdecl split-point))) (maybe-msgp er?)) :rule-classes :rewrite)
Theorem:
(defthm booleanp-of-split-fn-ext-declon.target-found (b* (((mv ?er? ?target-found ?extdecls) (split-fn-ext-declon target-fn new-fn-name extdecl split-point))) (booleanp target-found)) :rule-classes :rewrite)
Theorem:
(defthm ext-declon-listp-of-split-fn-ext-declon.extdecls (b* (((mv ?er? ?target-found ?extdecls) (split-fn-ext-declon target-fn new-fn-name extdecl split-point))) (ext-declon-listp extdecls)) :rule-classes :rewrite)
Theorem:
(defthm true-listp-of-split-fn-ext-declon.extdecls (b* (((mv ?er? ?target-found ?extdecls) (split-fn-ext-declon target-fn new-fn-name extdecl split-point))) (true-listp extdecls)) :rule-classes :type-prescription)