Make new directories if they don't already exist, like
(mkdir dir &optional (state 'state)) → (mv successp state)
In the logic this function reads from the ACL2 oracle to determine
if it succeeds. In the execution, we attempt to create directories using the
Common Lisp function
Function:
(defun mkdir-fn (dir state) (declare (xargs :stobjs (state))) (declare (xargs :guard (stringp dir))) (let ((__function__ 'mkdir)) (declare (ignorable __function__)) (b* ((- (raise "Raw Lisp definition not installed?")) ((mv err val state) (read-acl2-oracle state)) (okp (and (not err) (booleanp val) val))) (mv okp state))))
Theorem:
(defthm booleanp-of-mkdir.successp (b* (((mv ?successp acl2::?state) (mkdir-fn dir state))) (booleanp successp)) :rule-classes :type-prescription)
Theorem:
(defthm state-p1-of-mkdir.state (implies (force (state-p1 state)) (b* (((mv ?successp acl2::?state) (mkdir-fn dir state))) (state-p1 state))) :rule-classes :rewrite)