| # 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 ⊦ ⌜copy(getpage((n0 + n) / VFS_PAGE_SIZE, content), (n0 + n) % VFS_PAGE_SIZE, buf1, n, min(n3, n2, n1))⌝ = ((content.stream from n0) to min(n3, n2, n1) + n) + (⌜buf0⌝ from min(n3, n2, n1) + n) |
⊦ n0 + m ≤ # buf0 ∧ n1 + m ≤ # buf1 → ⌜copy(buf0, n0, buf1, n1, m)⌝ = (⌜buf1⌝ to n1) + ((⌜buf0⌝ from n0) to m) + ((⌜buf1⌝ from n1 + m) to (# buf1 - n1 + m))
# 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, (n0 + n) % VFS_PAGE_SIZE + min(n3, n2, n1) ≤ # getpage((n0 + n) / VFS_PAGE_SIZE, content), n + min(n3, n2, n1) ≤ # 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 (# buf1 - 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: ⊦ afs-cons(dirs, files) ∧ ino ∈ files ∧ files[ino] = mkfile(m, md, m0, content) → # getpage(n, content) = VFS_PAGE_SIZE; (s)% ⊦ m ≤ n ↔ ¬ n < m; (ss)%f: ⊦ m < n → n ≠ 0; (forward) from specification nat-basic%lf-02: ⊦ m < n ∧ m = n0 → n0 < n; (forward) from specification nat-basic% ⊦ m < n → n ≠ 0; (s)% ⊦ m + n < m + n0 ↔ n < n0; (s)% ⊦ ¬ n1 < min(n0, n1, n2); (s)%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic%c: ⊦ m + n = n + m; from specification nat-basic%fle-01: ⊦ m ≤ n ∧ n < n0 → m < n0; (forward) from specification nat% ⊦ ¬ n0 < min(n0, n1, n2); (s) Used terms: min(n3, n2, n1), n, buf1, (n0 + n) % VFS_PAGE_SIZE, getpage((n0 + n) / VFS_PAGE_SIZE, content)