| err0 = ESUCCESS, f = abs-files(files)[fh.fid], fh = ofh[fd], 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 ∈ ofh, fd ∈ of, fh.fid ∈ abs-files(files), psynced → asynced ⊦ ⟨ofh[fd] := mkfh(ofh[fd].fid, ofh[fd].mode, n)⟩ (ofh = abs-of(of[fd, of[fd].pos:= n]) ∧ (psynced → asynced) ∧ n0 = n ∧ ESUCCESS = err0), whence = SEEK_CUR, whence = SEEK_END |
err0 = ESUCCESS, f = abs-files(files)[fh.fid], fh = ofh[fd], 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), fh.fid ∈ abs-files(files), fd ∈ of, fd ∈ ofh, psynced → asynced ⊦ whence = SEEK_END, whence = SEEK_CUR, ofh[fd, mkfh(ofh[fd].fid, ofh[fd].mode, n)] = abs-of(of[fd, of[fd].pos:= n]) ∧ (psynced → asynced) ∧ n0 = n ∧ ESUCCESS = err0
Used simplifier rules: ⊦ fd ∈ abs-of(of) ↔ fd ∈ of; (s)%fd ∈ of ⊦ abs-of(of)[fd] = mkfh(⌜of[fd].ino⌝ , of[fd].mode, of[fd].pos); (s)% ⊦ mkfh(fid, mode, m).fid = fid; (s)% ⊦ ⌜ino⌝ ∈ abs-files(files) ↔ ino ∈ files; (s)