| root.dir?, fids-cons(root, fs, ofh), posix-crash(root, fs, ofh, tree, fs0, ofh0), n ≤ # buf ⊦ ⟨if EFAIL = ESUCCESS then let fh = ofh[fd] in let f = fs[fh.fid] in choose n1 with n1 ≤ n ∧ fh.pos + n1 ≤ # f.content in {n := n1; buf := copy(f.content, fh.pos, buf, 0, n); ofh[fd].pos := fh.pos + n} ifnone n := 0 else n := ?⟩ posix-crash(root, fs, ofh, tree, fs0, ofh0), ∃ err. pre-read(fd, 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 ∧ fh.pos + n1 ≤ # f.content in {n := n1; buf := copy(f.content, fh.pos, buf, 0, n); ofh[fd].pos := fh.pos + n} ifnone n := 0 else n := ?⟩ 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 ⊦ ⟨n := ?⟩ posix-crash(root, fs, ofh, tree, fs0, ofh0), ∃ err. pre-read(fd, 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 ∧ fh.pos + n1 ≤ # f.content in {n := n1; buf := copy(f.content, fh.pos, buf, 0, n); ofh[fd].pos := fh.pos + n} ifnone n := 0 else n := ?⟩ posix-crash(root, fs, ofh, tree, fs0, ofh0)
Used simplifier rules: ⊦ ESUCCESS ≠ EFAIL; (s)