Transform a filepath.
(split-fn-filepath-transunit-map
target-fn new-fn-name map split-point)
→
(mv er? new-map)Function:
(defun split-fn-filepath-transunit-map (target-fn new-fn-name map split-point) (declare (xargs :guard (and (identp target-fn) (identp new-fn-name) (filepath-transunit-mapp map) (natp split-point)))) (b* (((reterr) nil) ((when (omap::emptyp map)) (retok nil)) ((mv path tunit) (omap::head map)) ((erp new-tunit) (split-fn-transunit target-fn new-fn-name tunit split-point)) ((erp new-map) (split-fn-filepath-transunit-map target-fn new-fn-name (omap::tail map) split-point))) (retok (omap::update (c$::filepath-fix path) new-tunit new-map))))
Theorem:
(defthm maybe-msgp-of-split-fn-filepath-transunit-map.er? (b* (((mv ?er? ?new-map) (split-fn-filepath-transunit-map target-fn new-fn-name map split-point))) (maybe-msgp er?)) :rule-classes :rewrite)
Theorem:
(defthm filepath-transunit-mapp-of-split-fn-filepath-transunit-map.new-map (implies (filepath-transunit-mapp map) (b* (((mv ?er? ?new-map) (split-fn-filepath-transunit-map target-fn new-fn-name map split-point))) (filepath-transunit-mapp new-map))) :rule-classes :rewrite)