| # buf0 = # buf1, # buf1 = n4 + n + min(n3, n2, n1), VFS_PAGE_SIZE = n2 + (n0 + n) % VFS_PAGE_SIZE, files[ino] = mkfile(n1 + n0 + n, md, # links(ino, dirs), content), ⌜buf1⌝ = ((content.stream from n0) to n) + (⌜buf0⌝ from n), afs-cons(dirs, files), ino ∈ files, (n0 + n) % VFS_PAGE_SIZE + min(n3, n2, n1) ≤ VFS_PAGE_SIZE, n + min(n3, n2, n1) ≤ # buf1, n3 + n ≤ # buf1 ⊦ (⌜buf1⌝ to n) + ((⌜getpage((n0 + n) / VFS_PAGE_SIZE, content)⌝ from (n0 + n) % VFS_PAGE_SIZE) to min(n3, n2, n1)) + ((⌜buf1⌝ from n + min(n3, n2, n1)) to n4) = ((content.stream from n0) to min(n3, n2, n1) + n) + (⌜buf0⌝ from min(n3, n2, n1) + n) |
# buf1 = n4 + n + min(n3, n2, n1), # buf0 = # buf1, VFS_PAGE_SIZE = n2 + (n0 + n) % VFS_PAGE_SIZE, files[ino] = mkfile(n1 + n0 + n, md, # links(ino, dirs), content), ⌜buf1⌝ = ((content.stream from n0) to n) + (⌜buf0⌝ from n), afs-cons(dirs, files), ino ∈ files, n3 + n ≤ # buf1, n + min(n3, n2, n1) ≤ # buf1, (n0 + n) % VFS_PAGE_SIZE + min(n3, n2, n1) ≤ VFS_PAGE_SIZE ⊦ (⌜buf1⌝ to n) + ((⌜getpage((n0 + n) / VFS_PAGE_SIZE, content)⌝ from (n0 + n) % VFS_PAGE_SIZE) to min(n3, n2, n1)) + (⌜buf1⌝ from n + min(n3, n2, n1)) = ((content.stream from n0) to min(n3, n2, n1) + n) + (⌜buf0⌝ from min(n3, n2, n1) + n)
Used simplifier rules: append-assoc: ⊦ (σ0 + σ3) + σ4 = σ0 + σ3 + σ4; from specification stream[buffer-inf]% ⊦ # buf = n + m → (⌜buf⌝ from n) to m = ⌜buf⌝ from n; (s)%c: ⊦ m + n = n + m; from specification nat-basic%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic