| of[fd] = mkfile(m, mode, m0), files[m] = mkfile(m1, md, m2, content), n = n0, ofh = abs-of(of), root.dir?, dom of < ino0, 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 ⊦ pre-seek(fd, n, SEEK_END, ESUCCESS, user, root, abs-files(files), ofh) ∧ ⟨err0 := ESUCCESS; if err0 = ESUCCESS then let fh = ofh[fd] in let f = abs-files(files)[fh.fid] in {n := # f.content + n; ofh[fd] := mkfh(ofh[fd].fid, ofh[fd].mode, n)}⟩ (ofh = abs-of(of[fd, of[fd].pos:= (m1 + n0)]) ∧ (psynced → asynced) ∧ m1 + n0 = n ∧ ESUCCESS = err0) |
files[m] = mkfile(m1, md, m2, content), of[fd] = mkfile(m, mode, m0), n = n0, ofh = abs-of(of), root.dir?, dom of < ino0, 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 ⊦ fd ∈ ofh ∧ ⟨err0 := ESUCCESS; if err0 = ESUCCESS then let fh = ofh[fd] in let f = abs-files(files)[fh.fid] in {n := # f.content + n; ofh[fd] := mkfh(ofh[fd].fid, ofh[fd].mode, n)}⟩ (ofh = abs-of(of[fd, of[fd].pos:= (m1 + n0)]) ∧ (psynced → asynced) ∧ m1 + n0 = n ∧ ESUCCESS = err0)
Used simplifier rules: ⊦ pre-seek(fd, n, whence, ESUCCESS, user, root, fs, ofh) ↔ fd ∈ ofh; (s)