Parse and abstract a Leo file at a path into an AST.
(ast-from-file-at-path path state) → (mv tree state)
This function attempts to parse and abstract a Leo source file at a given path.
If parsing is successful, we return a
Function:
(defun ast-from-file-at-path (path state) (declare (xargs :stobjs (state))) (declare (xargs :guard (stringp path))) (let ((__function__ 'ast-from-file-at-path)) (declare (ignorable __function__)) (b* (((mv file-cst state) (parse-from-file-at-path path state)) ((when (reserrp file-cst)) (mv file-cst state))) (mv (abs-file file-cst) state))))
Theorem:
(defthm file-resultp-of-ast-from-file-at-path.tree (b* (((mv ?tree acl2::?state) (ast-from-file-at-path path state))) (file-resultp tree)) :rule-classes :rewrite)