| # buf = VFS_PAGE_SIZE, err = ESUCCESS, afs-cons(dirs, files), dcache-cons(dcache, dirs, files), icache-cons(icache, dirs, files), pcache-cons(pcache, dirs, files), synced(dirs, icache, pcache), m ∈ files, ¬ datakey(m, pageno) ∈ pcache, asynced2 → synced(files, icache, pcache) ⊦ ⟪afs_readpage#(mkinode(m, md, boolvar, m0, m1, m2), pageno, dirs, files, asynced1; buf, err); if err = ESUCCESS ∧ buf ≠ zeropage then let asynced = false in pcache_set#(m, pageno, buf, asynced; err, pcache)⟫ (pcache-cons(pcache, dirs, files) ∧ synced(dirs, icache, pcache) ∧ (asynced2 → synced(files, icache, pcache))) |
# buf = VFS_PAGE_SIZE, asynced ↔ asynced1, err = ESUCCESS, inode = mkinode(m, md, boolvar, m0, m1, m2), afs-cons(dirs, files), dcache-cons(dcache, dirs, files), icache-cons(icache, dirs, files), pcache-cons(pcache, dirs, files), synced(dirs, icache, pcache), m ∈ files, asynced2 → synced(files, icache, pcache) ⊦ ⟪if pre-readpage(inode, pageno, buf, dirs, files) then { {if pageno ∈ files[inode.ino].content then buf := files[inode.ino].content[pageno] else buf := zeropage; err := ESUCCESS} or fail#(; ; err)} else abort; if err = ESUCCESS ∧ buf ≠ zeropage then let asynced = false in pcache_set#(m, pageno, buf, asynced; err, pcache)⟫ (pcache-cons(pcache, dirs, files) ∧ synced(dirs, icache, pcache) ∧ (asynced2 → synced(files, icache, pcache))), datakey(m, pageno) ∈ pcache
Used simplifier rules: afs_readpage#(INODE, PAGENO, DIRS, FILES, ASYNCED; PBUF, ERR) {if pre-readpage(INODE, PAGENO, PBUF, DIRS, FILES) then { {if PAGENO ∈ FILES[INODE.ino].content then PBUF := FILES[INODE.ino].content[PAGENO] else PBUF := zeropage; ERR := ESUCCESS} or fail#(; ; ERR)} else abort };