| # buf = VFS_PAGE_SIZE, ¬ asynced0, 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, asynced → synced(files, icache, pcache) ⊦ ⟪pcache_get#(m, pageno, pcache; asynced0, buf, err); if ¬ asynced0 ∨ err ≠ ESUCCESS then {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) ∧ (asynced → synced(files, icache, pcache))) |
# buf = VFS_PAGE_SIZE, asynced ↔ asynced0, ¬ asynced0, ino = m, 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) ⊦ ⟪let key = datakey(ino, pageno) in if key ∈ pcache then let pe = pcache[key] in {buf := pe.page; asynced := true} else asynced := false; err := ESUCCESS; if ¬ asynced ∨ err ≠ ESUCCESS then {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)))
Used simplifier rules: pcache_get#(INO, PAGENO, PCACHE; HIT, BUF, ERR) {let KEY = datakey(INO, PAGENO) in if KEY ∈ PCACHE then let PE = PCACHE[KEY] in {BUF := PE.page; HIT := true} else HIT := false; ERR := ESUCCESS };