Read a file to preprocess, explicitly specified as user input.
(read-input-file-to-preproc path file state) → (mv erp bytes state)
This is used for the files whose paths are explicitly passed to pproc-files. We concatenate the path prefix to the file path suffix, with a slash in between (this is for Unix-like systems). We read the bytes from the file system, and return them.
Function:
(defun read-input-file-to-preproc (path file state) (declare (xargs :stobjs (state))) (declare (xargs :guard (and (stringp path) (stringp file)))) (b* (((reterr) nil state) (path-to-read (str::cat path "/" file)) ((mv erp bytes state) (acl2::read-file-into-byte-list path-to-read state)) ((when erp) (reterr (msg "Reading ~x0 failed." path-to-read)))) (retok bytes state)))
Theorem:
(defthm byte-listp-of-read-input-file-to-preproc.bytes (b* (((mv acl2::?erp ?bytes acl2::?state) (read-input-file-to-preproc path file state))) (byte-listp bytes)) :rule-classes :rewrite)