| dirs[ino1] = mkdir(# entries, md, # links(ino1, dirs), m1, entries), 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), px(user, md), px-parent(user, q, ROOT_INO, dirs, files), ino1 ∈ dirs, psynced → asynced, links(ino1, dirs) ≠ ∅ ∨ ino1 = ROOT_INO ⊦ (¬ ispath(q + str ', ROOT_INO, dirs, files) ∨ ¬ parent(path') ∈ root) ∧ ⟨err0 := ENOENT; if err0 = ESUCCESS then let fid = root[q + str '].fid in root[path'] := fnode(fid); psynced := ?⟩ (abs(root, ROOT_INO)(dirs) ∧ (psynced → asynced) ∧ ENOENT = err0), path' = ε, str ∈ entries |
⊦ abs(tree, ino)(dirs) ∧ fids-cons(tree, abs-files(files), ofh) ∧ afs-cons(dirs, files) → (p ∈ tree ↔ ispath(p, ino, dirs, files))
dirs[ino1] = mkdir(# entries, md, # links(ino1, dirs), m1, entries), path' ≠ ε, 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), px(user, md), px-parent(user, q, ROOT_INO, dirs, files), ino1 ∈ dirs, ¬ str ∈ entries, psynced → asynced, links(ino1, dirs) ≠ ∅ ∨ ino1 = ROOT_INO ⊦ ⟨err0 := ENOENT; if err0 = ESUCCESS then let fid = root[q + str '].fid in root[path'] := fnode(fid); psynced := ?⟩ (abs(root, ROOT_INO)(dirs) ∧ (psynced → asynced) ∧ ENOENT = err0)
Used simplifier rules: path-in-eq: ⊦ abs(tree, ino)(dirs) ∧ fids-cons(tree, abs-files(files), ofh) ∧ afs-cons(dirs, files) → (p ∈ tree ↔ ispath(p, ino, dirs, files));% ⊦ mkdir(m, md, m0, m1, entries).entries = entries; (s)%a: ⊦ (p + p0) + p1 = p + p0 + p1; from specification list[path]%⊦ ispath(str ', n, dirs, files) ↔ n ∈ dirs ∧ str ∈ dirs[n].entries ∧ (dirs[n].entries[str] ∈ dirs ∨ dirs[n].entries[str] ∈ files); (s)%⊦ ispath(p, n, m, dirs, files) → (ispath(p + q, n, dirs, files) ↔ ispath(q, m, dirs, files)); (s)