| root.dir?, fids-cons(root, fs, ofh), posix-crash(root, fs, ofh, tree, fs0, ofh0), n ≤ # buf ⊦ pre-write(fd, buf, n, EFAIL, user, root, fs, ofh) ∧ ⟨err0 := EFAIL; if err0 = ESUCCESS then let fh = ofh[fd] in let f = fs[fh.fid] in choose n1 with n1 ≤ n in {n := n1; f.content := splice(buf, 0, f.content, fh.pos, n); fs[fh.fid] := f; ofh[fd].pos := fh.pos + n} else n := ?; psynced := ?⟩ (psynced ∧ posix-crash(root, fs, ofh, tree, fs0, ofh0)), ∃ err. pre-write(fd, buf, n, err, user, root, fs, ofh) ∧ ⟨err0 := err; if err0 = ESUCCESS then let fh = ofh[fd] in let f = fs[fh.fid] in choose n1 with n1 ≤ n in {n := n1; f.content := splice(buf, 0, f.content, fh.pos, n); fs[fh.fid] := f; ofh[fd].pos := fh.pos + n} else n := ?; psynced := ?⟩ (psynced ∧ posix-crash(root, fs, ofh, tree, fs0, ofh0)) |
root.dir?, fids-cons(root, fs, ofh), posix-crash(root, fs, ofh, tree, fs0, ofh0), n ≤ # buf ⊦ ∃ err. pre-write(fd, buf, n, err, user, root, fs, ofh) ∧ ⟨err0 := err; if err0 = ESUCCESS then let fh = ofh[fd] in let f = fs[fh.fid] in choose n1 with n1 ≤ n in {n := n1; f.content := splice(buf, 0, f.content, fh.pos, n); fs[fh.fid] := f; ofh[fd].pos := fh.pos + n} else n := ?; psynced := ?⟩ (psynced ∧ posix-crash(root, fs, ofh, tree, fs0, ofh0)), ⟨err0 := EFAIL; if err0 = ESUCCESS then let fh = ofh[fd] in let f = fs[fh.fid] in choose n1 with n1 ≤ n in {n := n1; f.content := splice(buf, 0, f.content, fh.pos, n); fs[fh.fid] := f; ofh[fd].pos := fh.pos + n} else n := ?; psynced := ?⟩ (psynced ∧ posix-crash(root, fs, ofh, tree, fs0, ofh0))
Used simplifier rules: ⊦ pre-write(fd, buf, n, EFAIL, user, root, fs, ofh); (s)