| dirs[entries[str]] = mkdir(0, md0, # links(entries[str], dirs), m2, ∅), dirs[ino1] = mkdir(# entries, md, # links(ino1, dirs), m1, entries), root[q + str '] = dnode(md1, ∅), fs = abs-files(files), root.dir?, root[q].dir?, dom of < ino0, abs(root, ROOT_INO)(dirs), afs-cons(dirs, files), fids-cons(root, abs-files(files), abs-of(of)), ispath(q, ROOT_INO, ino1, dirs, files), of-cons(of, dirs, files), pw(user, md), px(user, md), px-parent(user, q, ROOT_INO, dirs, files), str ∈ entries, ino1 ∈ dirs, entries[str] ∈ dirs, psynced → asynced, links(ino1, dirs) ≠ ∅ ∨ ino1 = ROOT_INO ⊦ ⟨posix_unlink#(q + str ', user, abs-of(of); err0, root, fs; psynced)⟩ (fs = abs-files(files) ∧ abs(root, ROOT_INO)(dirs) ∧ (psynced → asynced) ∧ EISDIR = err0) |
root[q + str '] = dnode(md1, ∅), dirs[ino1] = mkdir(# entries, md, # links(ino1, dirs), m1, entries), dirs[entries[str]] = mkdir(0, md0, # links(entries[str], dirs), m2, ∅), fs = abs-files(files), ofh = abs-of(of), path = q + str ', root[q].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(q, ROOT_INO, ino1, dirs, files), of-cons(of, dirs, files), pw(user, md), px(user, md), px-parent(user, q, ROOT_INO, dirs, files), entries[str] ∈ dirs, ino1 ∈ dirs, str ∈ entries, psynced → asynced, links(ino1, dirs) ≠ ∅ ∨ ino1 = ROOT_INO ⊦ ⟨choose err with pre-unlink(path, err, user, root, fs, ofh) in err0 := err; if err0 = ESUCCESS then let fid = root[path].fid in {root := root -- path; if ¬ fid ∈ ofh.fids ∧ ¬ fid ∈ root.fids then fs := fs -- fid}; psynced := ?⟩ (fs = abs-files(files) ∧ abs(root, ROOT_INO)(dirs) ∧ (psynced → asynced) ∧ EISDIR = err0)
Used simplifier rules: posix_unlink#(PATH, USER, OFH; ERR, ROOT, FS; PSYNCED) {choose E with pre-unlink(PATH, E, USER, ROOT, FS, OFH) in ERR := E; if ERR = ESUCCESS then let FID = ROOT[PATH].fid in {ROOT := ROOT -- PATH; if ¬ FID ∈ OFH.fids ∧ ¬ FID ∈ ROOT.fids then FS := FS -- FID}; PSYNCED := ? };