Process the
(input-files-process-path path) → (mv erp new-path)
If the string is not
Function:
(defun input-files-process-path (path) (declare (xargs :guard t)) (let ((__function__ 'input-files-process-path)) (declare (ignorable __function__)) (b* (((reterr) "") ((unless (stringp path)) (reterr (msg "The :PATH input must be a string, ~ but it is ~x0 instead." path))) (path-chars (acl2::explode path)) ((unless (consp path-chars)) (reterr (msg "The :PATH input must be not empty, ~ but it is the empty string instead."))) (path-chars (if (and (consp (cdr path-chars)) (eql (car (last path-chars)) #\/)) (butlast path-chars 1) path-chars)) (path (acl2::implode path-chars))) (retok path))))
Theorem:
(defthm stringp-of-input-files-process-path.new-path (b* (((mv acl2::?erp ?new-path) (input-files-process-path path))) (stringp new-path)) :rule-classes :rewrite)