| m2 / VFS_PAGE_SIZE = inode.size / VFS_PAGE_SIZE, afs_asynced ↔ cache_asynced, asynced ↔ asynced0, cache_asynced ↔ cache_asynced, asynced ↔ asynced, afs_asynced0 ↔ cache_asynced, cache_sync0 ↔ cache_sync, asynced1 ↔ asynced, ((cache_files ⊕ cache_pcache) ⊕ cache_icache)[m] = mkfile(m0, md0, m1, content), afs_dirs = cache_dirs, afs_dirs0 = cache_dirs, afs_files = (cache_files ⊕ cache_pcache) ⊕ cache_icache, afs_files0 = (cache_files ⊕ cache_pcache) ⊕ cache_icache, buf-opt = buf-opt0, buf-opt = buf-opt, buf-opt1 = buf-opt, cache_dcache0 = cache_dcache, cache_dirs = cache_dirs, err = err0, err = err, err1 = err, inode = mkinode(m, md, false, m1, 0, m2), inode = inode, inode1 = inode, n0 = n, pageno0 = m2 / VFS_PAGE_SIZE, (cache_files ⊕ cache_pcache) ⊕ cache_icache = (cache_files ⊕ cache_pcache) ⊕ cache_icache, buf-opt.none?, afs-cons(cache_dirs, (cache_files ⊕ cache_pcache) ⊕ 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_pcache, cache_dirs, cache_files), synced(cache_dirs, cache_icache, cache_pcache), valid-file-inode(inode, cache_dirs, (cache_files ⊕ cache_pcache) ⊕ cache_icache), m ∈ cache_files, datakey(m, m2 / VFS_PAGE_SIZE) ∈ cache_pcache, datakey(inode.ino, m2 / VFS_PAGE_SIZE) ∈ cache_pcache, cache_sync → synced(cache_files, cache_icache, cache_pcache) ⊦ [cache_truncate#(n, m2 / VFS_PAGE_SIZE; buf-opt, inode, asynced, err, cache_dirs, cache_files, cache_asynced, cache_icache, cache_pcache)] ( ⟨afs_truncate#(n0, pageno0; buf-opt1, inode1, asynced1, err1, afs_dirs0, afs_files0, afs_asynced0)⟩ ( (afs_dirs0 = cache_dirs ∧ afs_files0 = (cache_files ⊕ cache_pcache) ⊕ cache_icache ∧ (afs_asynced0 ↔ cache_asynced)) ∧ buf-opt = buf-opt1 ∧ inode = inode1 ∧ (asynced ↔ asynced1) ∧ err = err1) → ⟨inode0 := mkinode(m, md, false, m1, 0, m2); afs_truncate#(n, m2 / VFS_PAGE_SIZE; buf-opt0, inode0, asynced0, err0, afs_dirs, afs_files, afs_asynced)⟩ ( afs_dirs = cache_dirs ∧ afs_files = (cache_files ⊕ cache_pcache) ⊕ cache_icache ∧ (afs_asynced ↔ cache_asynced) ∧ buf-opt = buf-opt0 ∧ inode = inode0 ∧ (asynced ↔ asynced0) ∧ err = err0)), buf-opt0.some? |
afs_asynced0 ↔ cache_asynced, asynced ↔ asynced0, ((cache_files ⊕ cache_pcache) ⊕ cache_icache)[m] = mkfile(m0, md0, m1, content), afs_dirs0 = cache_dirs, afs_files = (cache_files ⊕ cache_pcache) ⊕ cache_icache, buf-opt = none, err = err0, inode = mkinode(m, md, false, m1, 0, m2), afs-cons(cache_dirs, (cache_files ⊕ cache_pcache) ⊕ 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_pcache, cache_dirs, cache_files), synced(cache_dirs, cache_icache, cache_pcache), m ∈ cache_files, datakey(m, m2 / VFS_PAGE_SIZE) ∈ cache_pcache, cache_sync → synced(cache_files, cache_icache, cache_pcache) ⊦ [cache_truncate#(n, m2 / VFS_PAGE_SIZE; buf-opt, inode, asynced, err, cache_dirs, cache_files, cache_asynced, cache_icache, cache_pcache)] ( ⟨buf-opt1 := none; inode1 := mkinode(m, md, false, m1, 0, m2); afs_truncate#(n, m2 / VFS_PAGE_SIZE; buf-opt1, inode1, asynced0, err0, afs_dirs0, afs_files, afs_asynced0)⟩ ( afs_dirs0 = cache_dirs ∧ afs_files = (cache_files ⊕ cache_pcache) ⊕ cache_icache ∧ (afs_asynced0 ↔ cache_asynced) ∧ buf-opt = buf-opt1 ∧ inode = inode1 ∧ (asynced ↔ asynced0) ∧ err = err0) → ⟨inode0 := mkinode(m, md, false, m1, 0, m2); buf-opt0 := none; afs_truncate#(n, m2 / VFS_PAGE_SIZE; buf-opt0, inode0, asynced0, err0, afs_dirs0, afs_files, afs_asynced0)⟩ ( afs_dirs0 = cache_dirs ∧ afs_files = (cache_files ⊕ cache_pcache) ⊕ cache_icache ∧ (afs_asynced0 ↔ cache_asynced) ∧ buf-opt = buf-opt0 ∧ inode = inode0 ∧ (asynced ↔ asynced0) ∧ err = err0))
Used simplifier rules: ⊦ ¬ none.some?; (s)% ⊦ mkfile(m, md, m0, content).nlink = m0; (s)% ⊦ buf-opt.none? ↔ buf-opt = none; (s)% ⊦ mkinode(m, md, boolvar, m0, m1, m2).directory ↔ boolvar; (s)% ⊦ mkinode(m, md, boolvar, m0, m1, m2).nsubdirs = m1; (s)% ⊦ mkinode(m, md, boolvar, m0, m1, m2).nlink = m0; (s)% ⊦ ino ∈ files ⊕ pcache ↔ ino ∈ files; (s)% ⊦ ino ∈ files ⊕ icache ↔ ino ∈ files; (s)% ⊦ valid-file-ino(ino, dirs, files) ↔ ino ∈ files; (s)%⊦ valid-file-inode(inode, dirs, files) ↔ valid-file-ino(inode.ino, dirs, files) ∧ inode.nlink = files[inode.ino].nlink ∧ inode.nsubdirs = 0 ∧ ¬ inode.directory; (s)% ⊦ mkinode(m, md, boolvar, m0, m1, m2).ino = m; (s)% ⊦ mkinode(m, md, boolvar, m0, m1, m2).size = m2; (s)