| of[fd] = mkfile(m, mode, m0), err0 = ESUCCESS, n = n0, ofh = abs-of(of), root.dir?, dom of < ino, 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, psynced → asynced ⊦ ⟨if err0 = ESUCCESS then let fh = ofh[fd] in let f = abs-files(files)[fh.fid] in {n := fh.pos + n; ofh[fd] := mkfh(ofh[fd].fid, ofh[fd].mode, n)}⟩ (ofh = abs-of(of[fd, of[fd].pos:= (m0 + n0)]) ∧ (psynced → asynced) ∧ m0 + n0 = n ∧ ESUCCESS = err0) |
of[fd] = mkfile(m, mode, m0), err0 = ESUCCESS, n = n0, ofh = abs-of(of), root.dir?, dom of < ino, 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, psynced → asynced ⊦ ⟨let fh = ofh[fd] in let f = abs-files(files)[fh.fid] in {n := fh.pos + n; ofh[fd] := mkfh(ofh[fd].fid, ofh[fd].mode, n)}⟩ (ofh = abs-of(of[fd, of[fd].pos:= (m0 + n0)]) ∧ (psynced → asynced) ∧ m0 + n0 = n ∧ ESUCCESS = err0)