| # lpt = # avol, avol[m] = mapped(buf0), m < # avol, ebm-vol-inv(avol), is-aligned(n, EB_PAGE_SIZE), is-aligned(m0, EB_PAGE_SIZE), n0 + n ≤ # buf, m0 + n ≤ LEB_SIZE, # buf0 ≤ m0 ⊦ ⟪apersistence_io_write#(m, m0, n0, n, buf, adr, m1, plog, lpt, ns; avol; err)⟫ (ebm-vol-inv(avol) ∧ # lpt = # avol) |
# lpt = # avol, avol[m3] = mapped(buf0), m = m2, m1 = m3, n0 = n, n1 = n2, m3 < # avol, ebm-vol-inv(avol), is-aligned(m0, EB_PAGE_SIZE), is-aligned(n, EB_PAGE_SIZE), # buf0 ≤ m0, m0 + n ≤ LEB_SIZE, n2 + n ≤ # buf ⊦ ⟪if m1 < # avol ∧ avol[m1].mapped? ∧ # avol[m1].data ≤ m0 ∧ is-aligned(m0, EB_PAGE_SIZE) ∧ is-aligned(n0, EB_PAGE_SIZE) ∧ m0 + n0 ≤ LEB_SIZE ∧ n1 + n0 ≤ # buf then {fail_or_success#(; ; err); if err = ESUCCESS then if n0 ≠ 0 then avol[m1] := mapped(avol[m1].data + mkempbuf(m0 - # avol[m1].data) + subarray(buf, n1, n0)) else choose n with n < n0 ∧ is-aligned(n, EB_PAGE_SIZE) in if n ≠ 0 then avol[m1] := mapped(avol[m1].data + mkempbuf(m0 - # avol[m1].data) + subarray(buf, n1, n)) ifnone skip} else abort⟫ (ebm-vol-inv(avol) ∧ # lpt = # avol)
Used simplifier rules: write: ⊦ ;