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