| of[fd] = mkfile(m, mode, m0), root.dir?, dom of < ino2, abs(root, ROOT_INO)(dirs), afs-cons(dirs, files), fids-cons(root, abs-files(files), abs-of(of)), of-cons(of, dirs, files), fd ∈ of, n0 ≤ # buf0, psynced → asynced ⊦ [fail#(; ; err); ofh := abs-of(of); n := n0; buf := buf0; if err = ESUCCESS then if inode.directory then err := EISDIR else let ino1 = m0, ino0 = m0 + n, ino = 0 in if ino1 ≤ inode.size then {let isdir = false in vfs_read_loop#(ino1, ino0, inode, isdir, dirs, files, asynced; buf, ino, err); if ino ≠ 0 then err := ESUCCESS; of[fd].pos := of[fd].pos + ino; n := ino} else n := 0] ( of-cons(of, dirs, files) ∧ dom of < ino2 → ⟨posix_read#(fd, user, root, abs-files(files); buf0, n0, err0, ofh)⟩ (ofh = abs-of(of) ∧ (psynced → asynced) ∧ buf = buf0 ∧ n = n0 ∧ err = err0)), mode ≠ MODE_R ∧ mode ≠ MODE_RW |
of[fd] = mkfile(m, mode, m0), root.dir?, dom of < ino2, abs(root, ROOT_INO)(dirs), afs-cons(dirs, files), fids-cons(root, abs-files(files), abs-of(of)), of-cons(of, dirs, files), fd ∈ of, n0 ≤ # buf0, psynced → asynced ⊦ [choose err0 with ⌊err0⌋ in err := err0; ofh := abs-of(of); n := n0; buf := buf0; if err = ESUCCESS then if inode.directory then err := EISDIR else let ino1 = m0, ino0 = m0 + n, ino = 0 in if ino1 ≤ inode.size then {let isdir = false in vfs_read_loop#(ino1, ino0, inode, isdir, dirs, files, asynced; buf, ino, err); if ino ≠ 0 then err := ESUCCESS; of[fd].pos := of[fd].pos + ino; n := ino} else n := 0] ( of-cons(of, dirs, files) ∧ dom of < ino2 → ⟨posix_read#(fd, user, root, abs-files(files); buf0, n0, err0, ofh)⟩ (ofh = abs-of(of) ∧ (psynced → asynced) ∧ buf = buf0 ∧ n = n0 ∧ err = err0)), mode ≠ MODE_R ∧ mode ≠ MODE_RW
Used simplifier rules: fail#(; ; ERR){choose ERR0 with ⌊ERR0⌋ in ERR := ERR0};