| VFS_PAGE_SIZE = n7 + (n0 + n6) % VFS_PAGE_SIZE, buf = mkbuf(VFS_PAGE_SIZE), err = ESUCCESS, err0 = ESUCCESS, ino0 = n6, inode = mkinode(m, md, boolvar, m0, m1, m2), pageno = (n0 + n6) / VFS_PAGE_SIZE, n0 + n6 < m2, afs-cons(dirs, files), pageno ∈ files[inode.ino].content, m ∈ files, n6 ≤ # buf1, n5 + n6 ≤ # buf1, m2 ≥ n0 + n6, n5 + n0 + n6 ≥ n0 + n6, ∀ n2, n3, n4, err, inode, m, md, boolvar, m0, m1, m2, isdir, dirs, files, buf, asynced. n2 - n3 + n4 < n5 → err = ESUCCESS ∧ inode = mkinode(m, md, boolvar, m0, m1, m2) ∧ ¬ isdir ∧ afs-cons(dirs, files) ∧ m ∈ files ∧ n4 ≤ # buf ∧ n3 + n4 ≤ m2 ∧ n3 + n4 ≤ n2 ∧ n2 ≤ # buf + n3 → ⟪vfs_read_block#(n3, n2, inode, dirs, files, asynced; buf, n4, isdir, err); while err = ESUCCESS ∧ ¬ isdir do vfs_read_block#(n3, n2, inode, dirs, files, asynced; buf, n4, isdir, err)⟫ true ⊦ ⟪buf0 := buf1; if err = ESUCCESS then {buf0 := copy(files[inode.ino].content[pageno], (n0 + n6) % VFS_PAGE_SIZE, buf0, ino0, min(n5 + n0 + n6 - n0 + n6, n7, m2 - n0 + n6)); ino0 := ino0 + min(n5 + n0 + n6 - n0 + n6, n7, m2 - n0 + n6)}; inode := mkinode(m, md, boolvar, m0, m1, m2); n := ino0, buf1 := buf0; n1 := n5 + n0 + n6; isdir := false; while err = ESUCCESS ∧ ¬ isdir do vfs_read_block#(n0, n1, inode, dirs, files, asynced; buf1, n, isdir, err)⟫ true, VFS_PAGE_SIZE = 0, m2 = n0 + n6, n5 = 0, n7 = 0 |
VFS_PAGE_SIZE = n7 + (n0 + n6) % VFS_PAGE_SIZE, err = ESUCCESS, ino0 = n6, m2 ≠ n0 + n6, n5 ≠ 0, n7 ≠ 0, n0 + n6 < m2, afs-cons(dirs, files), m ∈ files, (n0 + n6) / VFS_PAGE_SIZE ∈ files[m].content, n5 + n6 ≤ # buf1, n6 ≤ # buf1, ∀ n2, n3, n4, err, inode, m, md, boolvar, m0, m1, m2, isdir, dirs, files, buf, asynced. n2 - n3 + n4 < n5 → err = ESUCCESS ∧ inode = mkinode(m, md, boolvar, m0, m1, m2) ∧ ¬ isdir ∧ afs-cons(dirs, files) ∧ m ∈ files ∧ n4 ≤ # buf ∧ n3 + n4 ≤ m2 ∧ n3 + n4 ≤ n2 ∧ n2 ≤ # buf + n3 → ⟪vfs_read_block#(n3, n2, inode, dirs, files, asynced; buf, n4, isdir, err); while err = ESUCCESS ∧ ¬ isdir do vfs_read_block#(n3, n2, inode, dirs, files, asynced; buf, n4, isdir, err)⟫ true ⊦ ⟪buf0 := buf1; if err = ESUCCESS then {buf0 := copy(files[m].content[(n0 + n6) / VFS_PAGE_SIZE], (n0 + n6) % VFS_PAGE_SIZE, buf0, ino0, min(n5 + n0 + n6 - n0 + n6, n7, m2 - n0 + n6)); ino0 := ino0 + min(n5 + n0 + n6 - n0 + n6, n7, m2 - n0 + n6)}; inode := mkinode(m, md, boolvar, m0, m1, m2); n := ino0, buf1 := buf0; n1 := n5 + n0 + n6; isdir := false; while err = ESUCCESS ∧ ¬ isdir do vfs_read_block#(n0, n1, inode, dirs, files, asynced; buf1, n, isdir, err)⟫ true
Used simplifier rules: ⊦ mkinode(m, md, boolvar, m0, m1, m2).ino = m; (s)% ⊦ m < n → m ≤ n; (s)%c: ⊦ m + n = n + m; from specification nat-basic%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic% ⊦ m ≤ m + n; (s)% ⊦ m + n ≤ m + n0 ↔ n ≤ n0; (s)% ⊦ n ≥ m ↔ m ≤ n; (s)% ⊦ VFS_PAGE_SIZE ≠ 0; (s)