| # buf0 = VFS_PAGE_SIZE, asynced1 ↔ cache_asynced, afs_files = (cache_files ⊕ cache_pcache) ⊕ cache_icache, buf = buf0, dirs = cache_dirs, err = err0, files = cache_files, inode = mkinode(m, md, boolvar, m0, m1, m2), pcache = cache_pcache, afs-cons(cache_dirs, cache_files), afs-cons(cache_dirs, (cache_files ⊕ cache_pcache) ⊕ cache_icache), 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, cache_sync → synced(cache_files, cache_icache, cache_pcache) ⊦ ⟪if pre-readpage(inode, pageno, buf, dirs, files) then let asynced0 = false, ino = inode.ino in {pcache_get#(ino, pageno, pcache; asynced0, buf, err); if ¬ asynced0 ∨ err ≠ ESUCCESS then {afs_readpage#(inode, pageno, dirs, files, asynced1; buf, err); if err = ESUCCESS ∧ buf ≠ zeropage then let asynced = false in pcache_set#(ino, pageno, buf, asynced; err, pcache)}} else abort⟫ ⟨afs_readpage#(mkinode(m, md, boolvar, m0, m1, m2), pageno, cache_dirs, afs_files, cache_asynced; buf0, err0)⟩ (afs_files = (cache_files ⊕ pcache) ⊕ cache_icache ∧ buf = buf0 ∧ err = err0) |
# buf0 = VFS_PAGE_SIZE, asynced1 ↔ cache_asynced, afs_files = (cache_files ⊕ cache_pcache) ⊕ cache_icache, buf = buf0, dirs = cache_dirs, err = err0, files = cache_files, inode = mkinode(m, md, boolvar, m0, m1, m2), pcache = cache_pcache, 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, cache_sync → synced(cache_files, cache_icache, cache_pcache) ⊦ ⟪let asynced0 = false, ino = inode.ino in {pcache_get#(ino, pageno, pcache; asynced0, buf, err); if ¬ asynced0 ∨ err ≠ ESUCCESS then {afs_readpage#(inode, pageno, dirs, files, asynced1; buf, err); if err = ESUCCESS ∧ buf ≠ zeropage then let asynced = false in pcache_set#(ino, pageno, buf, asynced; err, pcache)}}⟫ ⟨afs_readpage#(mkinode(m, md, boolvar, m0, m1, m2), pageno, cache_dirs, afs_files, cache_asynced; buf0, err0)⟩ (afs_files = (cache_files ⊕ pcache) ⊕ cache_icache ∧ buf = buf0 ∧ err = err0)
Used simplifier rules: ⊦ pre-readpage(inode, n, buf, dirs, files) ↔ valid-file-ino(inode.ino, dirs, files) ∧ # buf = VFS_PAGE_SIZE; (s)% ⊦ mkinode(m, md, boolvar, m0, m1, m2).ino = m; (s)% ⊦ valid-file-ino(ino, dirs, files) ↔ ino ∈ files; (s)