| # avol0 = # avol1, # buf = (n2 + n4) * LEB_SIZE, # avol1 = n3 + n5 + n2 + n4, avol = avol0[n5 + n4, mapped(mkbuf(0))], lebs(avol0, n5, n4) = subarray(buf, 0, n4 * LEB_SIZE), m = 0, m0 = n5 + n4, n0 = LEB_SIZE, n1 = n4 * LEB_SIZE, n5 + n4 < # avol1, ebm-vol-inv(avol0[n5 + n4, mapped(mkbuf(0))]), ebm-vol-inv(avol1), ebm-vol-inv(avol0), is-aligned(LEB_SIZE, EB_PAGE_SIZE), mapped-full?(avol0, n5, n4), range=(avol0, n5 + n2 + n4, avol1, n5 + n2 + n4, n3), range=(avol0, 0, avol1, 0, n5), n4 * LEB_SIZE + LEB_SIZE ≤ # buf, n5 + n2 + n4 ≤ # avol1 ⊦ [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] ( ebm-vol-inv(avol) → ⟪n := n4 + 1⟫ ( n ≤ n2 + n4 ∧ (err = ESUCCESS ∨ ⌊err⌋ ) ∧ # avol = # avol1 ∧ range=(avol, 0, avol1, 0, n5) ∧ range=(avol, n5 + n2 + n4, avol1, n5 + n2 + n4, n3) ∧ (err = ESUCCESS → lebs(avol, n5, n) = subarray(buf, 0, n * LEB_SIZE) ∧ mapped-full?(avol, n5, n)) ∧ n4 < n)), n3 + n2 = 0, n2 = 0 |
# avol0 = # avol1, # buf = (n2 + n4) * LEB_SIZE, # avol1 = n3 + n5 + n2 + n4, lebs(avol0, n5, n4) = subarray(buf, 0, n4 * LEB_SIZE), n3 + n2 ≠ 0, n2 ≠ 0, n5 + n4 < # avol1, ebm-vol-inv(avol0[n5 + n4, mapped(mkbuf(0))]), ebm-vol-inv(avol1), ebm-vol-inv(avol0), is-aligned(LEB_SIZE, EB_PAGE_SIZE), mapped-full?(avol0, n5, n4), range=(avol0, n5 + n2 + n4, avol1, n5 + n2 + n4, n3), range=(avol0, 0, avol1, 0, n5), n4 * LEB_SIZE + LEB_SIZE ≤ # buf, n5 + n2 + n4 ≤ # avol1 ⊦ [fail_or_success#(; ; err); avol := avol0[n5 + n4, mapped(mkbuf(0))]; if err = ESUCCESS then avol[n5 + n4] := mapped(avol[n5 + n4].data + mkempbuf(0 - # avol[n5 + n4].data) + subarray(buf, n4 * LEB_SIZE, LEB_SIZE)) else {n1 := n4 * LEB_SIZE; n0 := LEB_SIZE; m0 := n5 + n4; m := 0; 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}] ( ebm-vol-inv(avol) → ⟪n := n4 + 1⟫ ( n ≤ n2 + n4 ∧ (err = ESUCCESS ∨ ⌊err⌋ ) ∧ # avol = # avol1 ∧ range=(avol, 0, avol1, 0, n5) ∧ range=(avol, n5 + n2 + n4, avol1, n5 + n2 + n4, n3) ∧ (err = ESUCCESS → lebs(avol, n5, n) = subarray(buf, 0, n * LEB_SIZE) ∧ mapped-full?(avol, n5, n)) ∧ n4 < n))
Used simplifier rules: c: ⊦ m + n = n + m; from specification nat-basic%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic% ⊦ m < m + n ↔ n ≠ 0; (s)% ⊦ m + n < m + n0 ↔ n < n0; (s)%lf-01: ⊦ m < n ∧ n = n0 → m < n0; (forward) from specification nat-basic% ⊦ LEB_SIZE ≠ 0; (s)