| ⟨if n0 ≠ 0 ∧ m2 ∈ content0 then {pageno := m2; if buf-opt.some? then buf := buf-opt.buf else buf := files2[ino4].content[pageno]; buf := fill(buf, zero, n0, VFS_PAGE_SIZE - n0); content[pageno] := buf; buf-opt := some(buf)}⟩ (pageno = pageno1 ∧ buf = buf0 ∧ content = content2 ∧ buf-opt = buf-opt0), m2 * VFS_PAGE_SIZE + n0 = m2 * VFS_PAGE_SIZE + n0, files2[ino4] = mkfile(m2 * VFS_PAGE_SIZE + n0, md, # links(ino4, dirs0), content0), buf-opt = none, content = content0, n0 < VFS_PAGE_SIZE, afs-cons(dirs0, files2), afs-cons(dirs0, files2[ino4, mkfile(m2 * VFS_PAGE_SIZE + n0, md, # links(ino4, dirs0), content2 upto (m2 * VFS_PAGE_SIZE + n0))]), files2 ~ files2[ino4, mkfile(m2 * VFS_PAGE_SIZE + n0, md, # links(ino4, dirs0), content2 upto (m2 * VFS_PAGE_SIZE + n0))], ino4 ∈ files2 ⊦ (content2.stream to (m2 + 1) * VFS_PAGE_SIZE) + σ⊥ from m2 * VFS_PAGE_SIZE + n0 = σ⊥, n0 = 0 |
⟨if m2 ∈ content0 then {pageno := m2; if buf-opt.some? then buf := buf-opt.buf else buf := files2[ino4].content[pageno]; buf := fill(buf, zero, n0, VFS_PAGE_SIZE - n0); content[pageno] := buf; buf-opt := some(buf)}⟩ (pageno = pageno1 ∧ buf = buf0 ∧ content = content2 ∧ buf-opt = buf-opt0), files2[ino4] = mkfile(m2 * VFS_PAGE_SIZE + n0, md, # links(ino4, dirs0), content0), buf-opt = none, content = content0, (content2.stream to VFS_PAGE_SIZE * m2 + VFS_PAGE_SIZE) + σ⊥ from m2 * VFS_PAGE_SIZE + n0 ≠ σ⊥, n0 ≠ 0, n0 < VFS_PAGE_SIZE, afs-cons(dirs0, files2[ino4, mkfile(m2 * VFS_PAGE_SIZE + n0, md, # links(ino4, dirs0), content2 upto (m2 * VFS_PAGE_SIZE + n0))]), afs-cons(dirs0, files2), files2 ~ files2[ino4, mkfile(m2 * VFS_PAGE_SIZE + n0, md, # links(ino4, dirs0), content2 upto (m2 * VFS_PAGE_SIZE + n0))], ino4 ∈ files2 ⊦
Used simplifier rules: mult-c: ⊦ m * n = n * m; from specification nat-mult%mult-a: ⊦ m0 * m * n = (m0 * m) * n; from specification nat-mult%c: ⊦ m + n = n + m; from specification nat-basic%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic% ⊦ m * (n + 1) = m * n + m; (s)