| # buf0 = VFS_PAGE_SIZE, asynced0 ↔ asynced5, asynced ↔ cache_asynced, ((cache_files ⊕ cache_pcache0) ⊕ cache_icache)[m3] = mkfile(m0, md0, # links(m3, cache_dirs), content0), cache_files[m3] = mkfile(m1, md2, # links(m3, cache_dirs), content1), cache_pcache0[datakey(m3, m2 / VFS_PAGE_SIZE)] = mkpentry(boolvar, buf0), afs_files = (cache_files ⊕ cache_pcache0) ⊕ cache_icache, buf-opt = buf-opt0, buf-opt0 = none, cache_dirs0 = cache_dirs, dirs = cache_dirs, err = err0, files = afs_files, inode = inode0, inode0 = mkinode(m3, md1, false, # links(m3, cache_dirs), 0, m2), inode1 = mkinode(m3, md1, false, # links(m3, cache_dirs), 0, m6), n = m6, pageno = m2 / VFS_PAGE_SIZE, afs-cons(cache_dirs, (cache_files ⊕ cache_pcache0) ⊕ cache_icache), afs-cons(cache_dirs, cache_files), dcache-cons(cache_dcache, cache_dirs, cache_files), icache-cons(cache_icache, cache_dirs, cache_files), pcache-cons(cache_pcache0, cache_dirs, cache_files), synced(cache_dirs, cache_icache, cache_pcache0), datakey(m3, m2 / VFS_PAGE_SIZE) ∈ cache_pcache0, m3 ∈ cache_files, cache_sync → synced(cache_files, cache_icache, cache_pcache0), ∀ key. key ∈ cache_pcache0 → key.data? ⊦ ⟨if pre-truncate(inode, n, pageno, buf-opt, dirs, files) then let old_ino = 0, size = 0 in afs_truncate_internal#(n, pageno; inode, buf-opt, old_ino, size, asynced0, err, dirs, files; asynced) else abort⟩ ( dirs = cache_dirs0 ∧ files = (cache_files[m3, mkfile(m6, md1, # links(m3, cache_dirs0), content1 upto min(m6, m2))] ⊕ truncate(m3, min(m6, m2), cache_pcache0)) ⊕ cache_icache[m3, mkientry(false, mkinode(m3, md1, false, # links(m3, cache_dirs0), 0, m6))] ∧ ¬ asynced ∧ none = buf-opt ∧ inode1 = inode ∧ ¬ asynced0 ∧ ESUCCESS = err), VFS_PAGE_SIZE = 0, m2 ≤ m6 ∧ m2 % VFS_PAGE_SIZE ≠ 0 |
# buf0 = VFS_PAGE_SIZE, asynced ↔ cache_asynced, asynced0 ↔ asynced5, cache_pcache0[datakey(m3, m2 / VFS_PAGE_SIZE)] = mkpentry(boolvar, buf0), cache_files[m3] = mkfile(m1, md2, # links(m3, cache_dirs), content1), ((cache_files ⊕ cache_pcache0) ⊕ cache_icache)[m3] = mkfile(m0, md0, # links(m3, cache_dirs), content0), afs_files = (cache_files ⊕ cache_pcache0) ⊕ cache_icache, buf-opt = buf-opt0, buf-opt0 = none, cache_dirs0 = cache_dirs, dirs = cache_dirs, err = err0, files = afs_files, inode = inode0, inode0 = mkinode(m3, md1, false, # links(m3, cache_dirs), 0, m2), inode1 = mkinode(m3, md1, false, # links(m3, cache_dirs), 0, m6), n = m6, pageno = m2 / VFS_PAGE_SIZE, afs-cons(cache_dirs, cache_files), afs-cons(cache_dirs, (cache_files ⊕ cache_pcache0) ⊕ cache_icache), dcache-cons(cache_dcache, cache_dirs, cache_files), icache-cons(cache_icache, cache_dirs, cache_files), pcache-cons(cache_pcache0, cache_dirs, cache_files), pre-truncate(inode, n, pageno, buf-opt, dirs, files), synced(cache_dirs, cache_icache, cache_pcache0), m3 ∈ cache_files, datakey(m3, m2 / VFS_PAGE_SIZE) ∈ cache_pcache0, cache_sync → synced(cache_files, cache_icache, cache_pcache0), ∀ key. key ∈ cache_pcache0 → key.data? ⊦ ⟨let old_ino = 0, size = 0 in afs_truncate_internal#(n, pageno; inode, buf-opt, old_ino, size, asynced0, err, dirs, files; asynced)⟩ ( dirs = cache_dirs0 ∧ files = (cache_files[m3, mkfile(m6, md1, # links(m3, cache_dirs0), content1 upto min(m6, m2))] ⊕ truncate(m3, min(m6, m2), cache_pcache0)) ⊕ cache_icache[m3, mkientry(false, mkinode(m3, md1, false, # links(m3, cache_dirs0), 0, m6))] ∧ ¬ asynced ∧ none = buf-opt ∧ inode1 = inode ∧ ¬ asynced0 ∧ ESUCCESS = err), VFS_PAGE_SIZE = 0, m2 ≤ m6 ∧ m2 % VFS_PAGE_SIZE ≠ 0
# buf0 = VFS_PAGE_SIZE, asynced ↔ cache_asynced, asynced0 ↔ asynced5, cache_pcache0[datakey(m3, m2 / VFS_PAGE_SIZE)] = mkpentry(boolvar, buf0), cache_files[m3] = mkfile(m1, md2, # links(m3, cache_dirs), content1), ((cache_files ⊕ cache_pcache0) ⊕ cache_icache)[m3] = mkfile(m0, md0, # links(m3, cache_dirs), content0), afs_files = (cache_files ⊕ cache_pcache0) ⊕ cache_icache, buf-opt = buf-opt0, buf-opt0 = none, cache_dirs0 = cache_dirs, dirs = cache_dirs, err = err0, files = afs_files, inode = inode0, inode0 = mkinode(m3, md1, false, # links(m3, cache_dirs), 0, m2), inode1 = mkinode(m3, md1, false, # links(m3, cache_dirs), 0, m6), n = m6, pageno = m2 / VFS_PAGE_SIZE, afs-cons(cache_dirs, cache_files), afs-cons(cache_dirs, (cache_files ⊕ cache_pcache0) ⊕ cache_icache), dcache-cons(cache_dcache, cache_dirs, cache_files), icache-cons(cache_icache, cache_dirs, cache_files), pcache-cons(cache_pcache0, cache_dirs, cache_files), synced(cache_dirs, cache_icache, cache_pcache0), m3 ∈ cache_files, datakey(m3, m2 / VFS_PAGE_SIZE) ∈ cache_pcache0, cache_sync → synced(cache_files, cache_icache, cache_pcache0), ∀ key. key ∈ cache_pcache0 → key.data? ⊦ ⟨abort⟩ ( dirs = cache_dirs0 ∧ files = (cache_files[m3, mkfile(m6, md1, # links(m3, cache_dirs0), content1 upto min(m6, m2))] ⊕ truncate(m3, min(m6, m2), cache_pcache0)) ⊕ cache_icache[m3, mkientry(false, mkinode(m3, md1, false, # links(m3, cache_dirs0), 0, m6))] ∧ ¬ asynced ∧ none = buf-opt ∧ inode1 = inode ∧ ¬ asynced0 ∧ ESUCCESS = err), VFS_PAGE_SIZE = 0, pre-truncate(inode, n, pageno, buf-opt, dirs, files), m2 ≤ m6 ∧ m2 % VFS_PAGE_SIZE ≠ 0