| # buf = VFS_PAGE_SIZE, (key0.ino = m ⊃ mkfile(m0, md, # links(key0.ino, dirs), content[n, buf]);mkfile(m4, md1, m5, content2)) = mkfile(m1, md0, m3, content0), files1[key0.ino] = mkfile(m4, md1, m5, content2), pcache[datakey(m, n), mkpentry(false, buf)][key0] = mkpentry(boolvar1, buf2), pcache1[key] = mkpentry(boolvar0, buf1), pcache[datakey(m, n)] = mkpentry(true, buf), files0[m] = mkfile(m0, md, # links(m, dirs), content1), files1[m] = mkfile(m0, md, # links(m, dirs), content), pcache[datakey(m, n), mkpentry(false, buf)][key] = mkpentry(boolvar, buf0), pcache[key0] = mkpentry(boolvar2, buf3), n * VFS_PAGE_SIZE < m2, afs-cons(dirs, files1[m, mkfile(m0, md, # links(m, dirs), content[n, buf])]), afs-cons(dirs, files1), afs-cons(dirs, files0), pcache-cons(pcache1, dirs, files0), key0 ∈ pcache[datakey(m, n), mkpentry(false, buf)], m ∈ files0, m ∈ files1, datakey(m, n) ∈ pcache, key0 ∈ pcache → key0.data? ∧ # buf3 = VFS_PAGE_SIZE ∧ key0.ino ∈ files1 ∧ (¬ boolvar2 → key0.part ∈ content2 ∧ buf3 = content2[key0.part]), ∀ key. (key ∈ pcache ↔ key ∈ pcache1) ∧ pcache[key].page = pcache1[key].page ∧ (pcache[key].dirty → pcache1[key].dirty), ∀ pageno. (pageno < n ⊃ (pageno ∈ content ↔ pageno ∈ content1 ⊕ mkcontent(m, pcache1)) ∧ content[pageno] = (content1 ⊕ mkcontent(m, pcache1))[pageno] ;(pageno ∈ content ↔ pageno ∈ content1) ∧ content[pageno] = content1[pageno] ), ∀ key1. key1 ∈ pcache → key1.data? ∧ # pcache[key1].page = VFS_PAGE_SIZE ∧ key1.ino ∈ files1 ∧ (¬ pcache[key1].dirty → key1.part ∈ files1[key1.ino].content ∧ pcache[key1].page = files1[key1.ino].content[key1.part]) ⊦ key0.data? ∧ # buf2 = VFS_PAGE_SIZE ∧ key0.ino ∈ files1 ∧ (¬ boolvar1 → key0.part ∈ content0 ∧ buf2 = content0[key0.part]) |
# buf = VFS_PAGE_SIZE, (key0.ino = m ⊃ mkfile(m0, md, # links(key0.ino, dirs), content[n, buf]);mkfile(m4, md1, m5, content2)) = mkfile(m1, md0, m3, content0), pcache[key0] = mkpentry(boolvar2, buf3), pcache[datakey(m, n), mkpentry(false, buf)][key] = mkpentry(boolvar, buf0), files1[m] = mkfile(m0, md, # links(m, dirs), content), files0[m] = mkfile(m0, md, # links(m, dirs), content1), pcache[datakey(m, n)] = mkpentry(true, buf), pcache1[key] = mkpentry(boolvar0, buf1), pcache[datakey(m, n), mkpentry(false, buf)][key0] = mkpentry(boolvar1, buf2), files1[key0.ino] = mkfile(m4, md1, m5, content2), n * VFS_PAGE_SIZE < m2, afs-cons(dirs, files0), afs-cons(dirs, files1), afs-cons(dirs, files1[m, mkfile(m0, md, # links(m, dirs), content[n, buf])]), pcache-cons(pcache1, dirs, files0), datakey(m, n) ∈ pcache, m ∈ files1, m ∈ files0, key0 ∈ pcache[datakey(m, n), mkpentry(false, buf)], key0 ∈ pcache → key0.data? ∧ # buf3 = VFS_PAGE_SIZE ∧ key0.ino ∈ files1 ∧ (¬ boolvar2 → key0.part ∈ content2 ∧ buf3 = content2[key0.part]), ∀ key1. key1 ∈ pcache → key1.data? ∧ # pcache[key1].page = VFS_PAGE_SIZE ∧ key1.ino ∈ files1 ∧ (¬ pcache[key1].dirty → key1.part ∈ files1[key1.ino].content ∧ pcache[key1].page = files1[key1.ino].content[key1.part]), ∀ pageno. (pageno < n ⊃ (pageno ∈ content ↔ pageno ∈ content1 ⊕ mkcontent(m, pcache1)) ∧ content[pageno] = (content1 ⊕ mkcontent(m, pcache1))[pageno] ;(pageno ∈ content ↔ pageno ∈ content1) ∧ content[pageno] = content1[pageno] ), ∀ key. (key ∈ pcache ↔ key ∈ pcache1) ∧ pcache[key].page = pcache1[key].page ∧ (pcache[key].dirty → pcache1[key].dirty) ⊦ key0 = datakey(m, n), key0.data? ∧ # buf2 = VFS_PAGE_SIZE ∧ key0.ino ∈ files1 ∧ (¬ boolvar1 → key0.part ∈ content0 ∧ buf2 = content0[key0.part])
Used simplifier rules: ⊦ datakey(m, m0).ino = m; (s)% ⊦ pcache[key, pe][key] = pe; (s)%⊦ mkpentry(boolvar, buf) = mkpentry(boolvar0, buf0) ↔ (boolvar ↔ boolvar0) ∧ buf = buf0; (ws)%⊦ mkfile(m, md, m0, content) = mkfile(m1, md0, m2, content0) ↔ m = m1 ∧ md = md0 ∧ m0 = m2 ∧ content = content0; (ws)% ⊦ key ∈ pcache[key, pe]; (s)% ⊦ datakey(m, m0).data?; (s)% ⊦ datakey(m, m0).part = m0; (s)%afs-cons-file-nlink: ⊦ afs-cons(dirs, files) ∧ ino ∈ files ∧ files[ino] = mkfile(m, md, n, content) → # links(ino, dirs) = n; (forward) from specification afs-base% ⊦ content[n, buf][n] = buf; (s)% ⊦ n ∈ content[n, buf]; (s) Used formulas: key0 = datakey(m, n)