| # lpt = # avol, avol[m3] = mapped(buf0), adr = adr0, m = m2, m1 = m3, n0 = n, n1 = n2, ns = ns0, plog = plog0, 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, avol ⊆ avol0 ⊦ ⟨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⟩ (avol ⊆ avol0) |
# lpt = # avol, avol[m3] = mapped(buf0), adr = adr0, m = m2, m1 = m3, n0 = n, n1 = n2, ns = ns0, plog = plog0, m3 < # avol, ebm-vol-inv(avol), is-aligned(n, EB_PAGE_SIZE), is-aligned(m0, EB_PAGE_SIZE), n2 + n ≤ # buf, m0 + n ≤ LEB_SIZE, # buf0 ≤ m0, avol ⊆ avol0 ⊦ ⟨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⟩ (avol ⊆ avol0)
Used simplifier rules: ⊦ mapped(buf).mapped?; (s)% ⊦ mapped(buf).data = buf; (s)