| # avol0 = # avol1, # lpt0 = # avol1, # buf1 = EB_PAGE_SIZE, avol0[m4] = mapped(buf2), align↓(m2 + n3, EB_PAGE_SIZE) = n0 + m2, m2 < EB_PAGE_SIZE, m4 < # avol1, n1 < n0, n1 < # buf3, awbuf-inv(avol1, buffered(m4)), ebm-vol-inv(avol0), is-aligned(n1 + m2, EB_PAGE_SIZE), is-aligned(n0 + m2, EB_PAGE_SIZE), is-aligned(# buf2, EB_PAGE_SIZE), # avol1[m4].data + n3 ≤ LEB_SIZE, n3 ≤ # buf3, EB_PAGE_SIZE ≤ m2 + n3, # buf2 + m2 + n3 ≤ LEB_SIZE, n0 ≤ # buf3, # buf2 + n0 + m2 ≤ LEB_SIZE, ⌊err1⌋ , ∀ n. n < # avol1 → (n ≠ m4 → avol1[n] = avol0[n]) ∧ (n = m4 → avol1[m4] = mapped(buf2 + subarray(buf1, 0, m2))) ⊦ n1 + m2 = 0, n3 = 0, is-aligned(# avol1[m4].data + n1, EB_PAGE_SIZE) |
# buf1 = EB_PAGE_SIZE, # lpt0 = # avol1, # avol0 = # avol1, avol0[m4] = mapped(buf2), align↓(m2 + n3, EB_PAGE_SIZE) = n0 + m2, n1 < # buf3, n1 < n0, m4 < # avol1, m2 < EB_PAGE_SIZE, awbuf-inv(avol1, buffered(m4)), ebm-vol-inv(avol0), is-aligned(# buf2, EB_PAGE_SIZE), is-aligned(n0 + m2, EB_PAGE_SIZE), is-aligned(n1 + m2, EB_PAGE_SIZE), # buf2 + n0 + m2 ≤ LEB_SIZE, n0 ≤ # buf3, # buf2 + m2 + n3 ≤ LEB_SIZE, EB_PAGE_SIZE ≤ m2 + n3, n3 ≤ # buf3, # avol1[m4].data + n3 ≤ LEB_SIZE, ⌊err1⌋ , ∀ n. n < # avol1 → (n ≠ m4 → avol1[n] = avol0[n]) ∧ (n = m4 → avol1[m4] = mapped(buf2 + subarray(buf1, 0, m2))) ⊦ n1 + m2 = 0, avol1[m4] = mapped(buf2 + subarray(buf1, 0, m2)), n3 = 0, is-aligned(# avol1[m4].data + n1, EB_PAGE_SIZE)
Used simplifier rules: ⊦ mapped(buf).data = buf; (s)% ⊦ #(buf + buf0) = # buf + # buf0; (s)% ⊦ # subarray(buf, m, n) = n; (s)%append-a: ⊦ (buf + buf0) + buf1 = buf + buf0 + buf1; from specification array-splice[buffer]%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic% ⊦ EB_PAGE_SIZE ≠ 0; (s)%c: ⊦ m + n = n + m; from specification nat-basic%m ≠ 0, is-aligned(n1, m) ⊦ is-aligned(n0 + n1, m) ↔ is-aligned(n0, m); (s) Used formulas: avol1[m4] = mapped(buf2 + subarray(buf1, 0, m2))