| # buf-opt.buf = VFS_PAGE_SIZE, asynced3 ↔ asynced6, asynced4 ↔ asynced5, asynced2 ↔ buf-opt.some?, asynced1 ↔ false, asynced0 ↔ false, files[m] = mkfile(m0, md0, # links(m, dirs), content), err = ESUCCESS, ino = inode.ino, inode = mkinode(m, md, false, # links(m, dirs), 0, m2), pageno = m2 / VFS_PAGE_SIZE, size = inode.size, buf-opt.some?, afs-cons(dirs, files), dcache-cons(dcache, dirs, files), icache-cons(icache, dirs, files), pcache-cons(pcache, dirs, files), pre-truncate(inode, n, pageno, buf-opt, dirs, files), synced(dirs, icache, pcache), m ∈ files, asynced → synced(files, icache, pcache) ⊦ ⟪if buf-opt.none? then let buf = ? in {pcache_check_page#(ino, pageno, pcache; asynced1, asynced0, err); if err = ESUCCESS ∧ asynced1 then pcache_get#(ino, pageno, pcache; asynced1, buf, err); if err = ESUCCESS ∧ asynced1 then buf-opt := some(buf)}; if err = ESUCCESS then afs_truncate#(n, pageno; buf-opt, inode, asynced4, err, dirs, files, asynced3); if err = ESUCCESS then let asynced = false in {icache_set#(inode, asynced; err, icache); pcache_truncate#(inode.ino, size, n; err, pcache); if asynced4 then pcache_set#(inode.ino, pageno, buf-opt.buf, asynced; err, pcache)}; if (¬ asynced4 ∨ err ≠ ESUCCESS) ∧ ¬ asynced2 then buf-opt := none⟫ ( icache-cons(icache, dirs, files) ∧ dcache-cons(dcache, dirs, files) ∧ pcache-cons(pcache, dirs, files) ∧ afs-cons(dirs, files) ∧ synced(dirs, icache, pcache) ∧ (asynced → synced(files, icache, pcache))), VFS_PAGE_SIZE = 0 |
# buf-opt.buf = VFS_PAGE_SIZE, asynced0 ↔ false, asynced1 ↔ false, asynced2 ↔ buf-opt.some?, asynced4 ↔ asynced5, asynced3 ↔ asynced6, files[m] = mkfile(m0, md0, # links(m, dirs), content), err = ESUCCESS, ino = inode.ino, inode = mkinode(m, md, false, # links(m, dirs), 0, m2), pageno = m2 / VFS_PAGE_SIZE, size = inode.size, buf-opt.some?, afs-cons(dirs, files), dcache-cons(dcache, dirs, files), icache-cons(icache, dirs, files), pcache-cons(pcache, dirs, files), pre-truncate(inode, n, pageno, buf-opt, dirs, files), synced(dirs, icache, pcache), m ∈ files, asynced → synced(files, icache, pcache) ⊦ ⟪skip; if err = ESUCCESS then afs_truncate#(n, pageno; buf-opt, inode, asynced4, err, dirs, files, asynced3); if err = ESUCCESS then let asynced = false in {icache_set#(inode, asynced; err, icache); pcache_truncate#(inode.ino, size, n; err, pcache); if asynced4 then pcache_set#(inode.ino, pageno, buf-opt.buf, asynced; err, pcache)}; if (¬ asynced4 ∨ err ≠ ESUCCESS) ∧ ¬ asynced2 then buf-opt := none⟫ ( icache-cons(icache, dirs, files) ∧ dcache-cons(dcache, dirs, files) ∧ pcache-cons(pcache, dirs, files) ∧ afs-cons(dirs, files) ∧ synced(dirs, icache, pcache) ∧ (asynced → synced(files, icache, pcache))), VFS_PAGE_SIZE = 0
Used simplifier rules: ⊦ buf-opt.none? ↔ buf-opt = none; (s)% ⊦ ¬ none.some?; (s)% ⊦ VFS_PAGE_SIZE ≠ 0; (s)%⊦ pre-truncate(inode, n, pageno, buf-opt, dirs, files) ↔ valid-file-inode(inode, dirs, files) ∧ pageno = inode.size / VFS_PAGE_SIZE ∧ (buf-opt.some? → # buf-opt.buf = VFS_PAGE_SIZE); (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)% ⊦ valid-file-ino(ino, dirs, files) ↔ ino ∈ files; (s)