| m = m1, m0 = m2, n0 = n, n1 = n2, m2 < # avols[v], ebm-cons(avols), ebm-cons(avols0), is-aligned(m1, EB_PAGE_SIZE), is-aligned(n, EB_PAGE_SIZE), v ∈ avols, m1 + n ≤ LEB_SIZE, n + n2 ≤ # buf, avols ⊆ avols0, avols[v][m2].mapped? → avols[v][m2].fill ≤ m1 ⊦ ⟨if v ∈ avols ∧ m0 < # avols[v] ∧ m + n0 ≤ LEB_SIZE ∧ is-aligned(m, EB_PAGE_SIZE) ∧ is-aligned(n0, EB_PAGE_SIZE) ∧ n0 + n1 ≤ # buf ∧ (avols[v][m0].mapped? → m ≥ avols[v][m0].fill) then {fail_or_success#(; ; err); if err = ESUCCESS then if avols[v][m0].mapped? then if n0 ≠ 0 then avols[v][m0] := mapped(subarray(avols[v][m0].data, 0, m) + subarray(buf, n1, n0) + mkempbuf(LEB_SIZE - m - n0), m + n0) else avols[v][m0] := mapped(mkempbuf(m) + subarray(buf, n1, n0) + mkempbuf(LEB_SIZE - m - n0), m + n0) else if avols[v][m0].mapped? then choose n with n < n0 ∧ is-aligned(n, EB_PAGE_SIZE) in if n ≠ 0 then avols[v][m0] := mapped(subarray(avols[v][m0].data, 0, m) + subarray(buf, n1, n) + mkempbuf(LEB_SIZE - m - n), m + n) ifnone skip else if n0 ≠ 0 then avols[v][m0] := unmapped} else abort⟩ (avols ⊆ avols0) |
m = m1, m0 = m2, n0 = n, n1 = n2, m2 < # avols[v], ebm-cons(avols0), ebm-cons(avols), is-aligned(n, EB_PAGE_SIZE), is-aligned(m1, EB_PAGE_SIZE), v ∈ avols, n + n2 ≤ # buf, m1 + n ≤ LEB_SIZE, avols ⊆ avols0, avols[v][m2].mapped? → avols[v][m2].fill ≤ m1 ⊦ ⟨fail_or_success#(; ; err); if err = ESUCCESS then if avols[v][m0].mapped? then if n0 ≠ 0 then avols[v][m0] := mapped(subarray(avols[v][m0].data, 0, m) + subarray(buf, n1, n0) + mkempbuf(LEB_SIZE - m - n0), m + n0) else avols[v][m0] := mapped(mkempbuf(m) + subarray(buf, n1, n0) + mkempbuf(LEB_SIZE - m - n0), m + n0) else if avols[v][m0].mapped? then choose n with n < n0 ∧ is-aligned(n, EB_PAGE_SIZE) in if n ≠ 0 then avols[v][m0] := mapped(subarray(avols[v][m0].data, 0, m) + subarray(buf, n1, n) + mkempbuf(LEB_SIZE - m - n), m + n) ifnone skip else if n0 ≠ 0 then avols[v][m0] := unmapped⟩ (avols ⊆ avols0)
Used simplifier rules: ⊦ n ≥ m ↔ m ≤ n; (s)