| files[m] = mkfile(m0, md0, # links(m, dirs), content), fs = abs-files(files), 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, m, dirs, files), of-cons(of, dirs, files), pw(user, md0), px-parent(user, path, ROOT_INO, dirs, files), m ∈ files, ROOT_INO ∈ dirs, psynced → asynced0 ⊦ pre-writemeta(path, md, ESUCCESS, user, root, fs, abs-of(of)) ∧ ⟨err0 := ESUCCESS; if err0 = ESUCCESS then if root[path].dir? then root[path].meta := md else let fid = root[path].fid in fs[fid] := mkfile(md, fs[fid].content); psynced := ?⟩ (fs = abs-files(files[m, mkfile(m0, md, # links(m, dirs), content)]) ∧ abs(root, ROOT_INO)(dirs) ∧ (psynced → asynced) ∧ ESUCCESS = err0), root[path].dir?, m ∈ dirs |
⊦ abs(tree, ino)(dirs) ∧ fids-cons(tree, abs-files(files), ofh) ∧ afs-cons(dirs, files) → (p ∈ tree ↔ ispath(p, ino, dirs, files))
files[m] = mkfile(m0, md0, # links(m, dirs), content), fs = abs-files(files), 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, m, dirs, files), of-cons(of, dirs, files), pw(user, md0), px-parent(user, path, ROOT_INO, dirs, files), ROOT_INO ∈ dirs, m ∈ files, ¬ root[path].dir?, ¬ m ∈ dirs, psynced → asynced0 ⊦ pw(user, path, root, fs) ∧ ⟨err0 := ESUCCESS; if err0 = ESUCCESS then if root[path].dir? then root[path].meta := md else let fid = root[path].fid in fs[fid] := mkfile(md, fs[fid].content); psynced := ?⟩ (fs = abs-files(files[m, mkfile(m0, md, # links(m, dirs), content)]) ∧ abs(root, ROOT_INO)(dirs) ∧ (psynced → asynced) ∧ ESUCCESS = 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));% ⊦ ispath(p, n, m, dirs, files) → ispath(p, n, dirs, files); (s)%⊦ pre-writemeta(p, md, ESUCCESS, user, root, fs, ofh) ↔ p ∈ root ∧ pw(user, p, root, fs); (s)