| files1 -- ino = files0 -- ino, files1[ino] = mkfile(m2, md0, # links(ino, dirs), content0), files0[ino] = mkfile(m2, md0, m4, content), afs-cons(dirs, files1), write-inv(n0, n1, buf, n, content, content0), ino ∈ files1, ino ∈ files0, n ≤ # buf, n1 ≤ # buf + n0, n0 + n ≤ n1, m + (n0 + n) % VFS_PAGE_SIZE ≤ VFS_PAGE_SIZE, n + m ≤ # buf ⊦ content0[(n0 + n) / VFS_PAGE_SIZE, copy(buf, n, getpage((n0 + n) / VFS_PAGE_SIZE, content0), (n0 + n) % VFS_PAGE_SIZE, m)].stream = (content.stream to n0) + (⌜buf⌝ to n + m) + (content.stream from n0 + n + m) |
⊦ write-inv(n0, n1, buf, n, content0, content1) ↔ content1.stream = (content0.stream to n0) + (⌜buf⌝ to n) + (content0.stream from n0 + n)
files1 -- ino = files0 -- ino, content0.stream = (content.stream to n0) + (⌜buf⌝ to n) + (content.stream from n0 + n), files0[ino] = mkfile(m2, md0, m4, content), files1[ino] = mkfile(m2, md0, # links(ino, dirs), content0), afs-cons(dirs, files1), ino ∈ files0, ino ∈ files1, n + m ≤ # buf, m + (n0 + n) % VFS_PAGE_SIZE ≤ VFS_PAGE_SIZE, n0 + n ≤ n1, n1 ≤ # buf + n0, n ≤ # buf ⊦ content0[(n0 + n) / VFS_PAGE_SIZE, copy(buf, n, getpage((n0 + n) / VFS_PAGE_SIZE, content0), (n0 + n) % VFS_PAGE_SIZE, m)].stream = (content.stream to n0) + (⌜buf⌝ to n + m) + (content.stream from n0 + n + m)
Used terms: content0, content, n, buf, n1, n0