| # avol1 = n3 + n0 + n2 + n1, # buf = (n2 + n1) * LEB_SIZE, # avol0 = # avol1, avol = avol0[n0 + n1, mapped(mkbuf(0))], buf0 = buf, lebs(avol0, n0, n1) = subarray(buf, 0, n1 * LEB_SIZE), m1 = n0 + n1, m2 = 0, n4 = LEB_SIZE, n5 = n1 * LEB_SIZE, avol[n0 + n1].mapped?, n0 + n1 < # avol1, n0 + n1 < # avol, ebm-vol-inv(avol0), ebm-vol-inv(avol1), ebm-vol-inv(avol0[n0 + n1, mapped(mkbuf(0))]), ebm-vol-inv(avol), is-aligned(0, EB_PAGE_SIZE), is-aligned(LEB_SIZE, EB_PAGE_SIZE), mapped-full?(avol0, n0, n1), range=(avol0, 0, avol1, 0, n0), range=(avol0, n0 + n2 + n1, avol1, n0 + n2 + n1, n3), n0 + n2 + n1 ≤ # avol1, # avol[n0 + n1].data ≤ 0, 0 + LEB_SIZE ≤ LEB_SIZE, n1 * LEB_SIZE + LEB_SIZE ≤ # buf ⊦ [ebm_avol_write#(n0 + n1, 0, n1 * LEB_SIZE, LEB_SIZE, buf; avol; err)] ( ebm-vol-inv(avol) → ⟪n := n1 + 1⟫ ( n ≤ n2 + n1 ∧ ebm-vol-inv(avol) ∧ (err = ESUCCESS ∨ ⌊err⌋ ) ∧ # avol = # avol1 ∧ range=(avol, 0, avol1, 0, n0) ∧ range=(avol, n0 + n2 + n1, avol1, n0 + n2 + n1, n3) ∧ (err = ESUCCESS → lebs(avol, n0, n) = subarray(buf, 0, n * LEB_SIZE) ∧ mapped-full?(avol, n0, n)) ∧ n1 < n)), n3 + n2 = 0, n2 = 0 |
# avol0 = # avol1, # buf = (n2 + n1) * LEB_SIZE, # avol1 = n3 + n0 + n2 + n1, avol = avol0[n0 + n1, mapped(mkbuf(0))], lebs(avol0, n0, n1) = subarray(buf, 0, n1 * LEB_SIZE), n3 + n2 ≠ 0, n2 ≠ 0, n0 + n1 < # avol1, ebm-vol-inv(avol0[n0 + n1, mapped(mkbuf(0))]), ebm-vol-inv(avol1), ebm-vol-inv(avol0), is-aligned(LEB_SIZE, EB_PAGE_SIZE), mapped-full?(avol0, n0, n1), range=(avol0, n0 + n2 + n1, avol1, n0 + n2 + n1, n3), range=(avol0, 0, avol1, 0, n0), n1 * LEB_SIZE + LEB_SIZE ≤ # buf, n0 + n2 + n1 ≤ # avol1 ⊦ [ebm_avol_write#(n0 + n1, 0, n1 * LEB_SIZE, LEB_SIZE, buf; avol; err)] ( ebm-vol-inv(avol) → ⟪n := n1 + 1⟫ ( n ≤ n2 + n1 ∧ (err = ESUCCESS ∨ ⌊err⌋ ) ∧ # avol = # avol1 ∧ range=(avol, 0, avol1, 0, n0) ∧ range=(avol, n0 + n2 + n1, avol1, n0 + n2 + n1, n3) ∧ (err = ESUCCESS → lebs(avol, n0, n) = subarray(buf, 0, n * LEB_SIZE) ∧ mapped-full?(avol, n0, n)) ∧ n1 < n))
Used simplifier rules: ⊦ mapped(buf).mapped?; (s)% ⊦ m < # avol → avol[m, aleb][m] = aleb; (s)% ⊦ # avol[n, aleb] = # avol; (s)%n ≠ 0 ⊦ is-aligned(0, n); (s)% ⊦ EB_PAGE_SIZE ≠ 0; (s)% ⊦ # mkbuf(n) = n; (s)% ⊦ mapped(buf).data = buf; (s)%m < # avol ⊦ avol[m, aleb][m] = aleb; (s)% ⊦ m < n → (n ≤ m ↔ false); (s)% ⊦ m < n ↔ ¬ n ≤ m; (ss)% ⊦ m ≤ m; (s)%c: ⊦ m + n = n + m; from specification nat-basic%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic% ⊦ n + 0 = n; (s)