| fs = abs-files(files), ofh = abs-of(of), root.dir?, root[path].dir?, dom of < ino0, abs(root, ROOT_INO)(dirs), afs-cons(dirs, files), fids-cons(root, abs-files(files), abs-of(of)), ispath(path, ROOT_INO, ino1, dirs, files), of-cons(of, dirs, files), px-parent(user, path, ROOT_INO, dirs, files), ino1 ∈ dirs, psynced → asynced ⊦ ∃ err. pre-truncate(path, n, err, user, root, fs, ofh) ∧ ⟨err0 := err; if err0 = ESUCCESS then let fid = root[path].fid in let buf = fs[fid].content in fs[fid].content := resize(buf, n); psynced := ?⟩ (fs = abs-files(files) ∧ (psynced → asynced) ∧ EISDIR = err0) |
fs = abs-files(files), root[path].dir?, root.dir?, dom of < ino0, abs(root, ROOT_INO)(dirs), afs-cons(dirs, files), fids-cons(root, abs-files(files), abs-of(of)), ispath(path, ROOT_INO, ino1, dirs, files), of-cons(of, dirs, files), px-parent(user, path, ROOT_INO, dirs, files), ino1 ∈ dirs, psynced → asynced ⊦ ∃ err. pre-truncate(path, n, err, user, root, fs, abs-of(of)) ∧ ⟨err0 := err; if err0 = ESUCCESS then let fid = root[path].fid in let buf = fs[fid].content in fs[fid] := mkfile(fs[fid].meta, resize(buf, n)); psynced := ?⟩ (fs = abs-files(files) ∧ (psynced → asynced) ∧ EISDIR = err0)
Used simplifier rules: ⊦ f.content:= buf = mkfile(f.meta, buf); (s)