| # avol0 = # avol1, # lpt0 = # avol1, # buf1 = EB_PAGE_SIZE, avol0[m4] = mapped(buf2), avol1[m4] = mapped(buf0), n0 < # avol1, m2 < EB_PAGE_SIZE, m2 + n < EB_PAGE_SIZE, m4 < # avol1, awbuf-inv(avol1, buffered(m4)), ebm-vol-inv(avol0), is-aligned(# buf2, EB_PAGE_SIZE), # buf0 + n ≤ LEB_SIZE, n ≤ # buf, # buf2 + m2 + n ≤ LEB_SIZE, n0 < # avol1 → (n0 ≠ m4 → avol1[n0] = avol0[n0]) ∧ (n0 = m4 → buf0 = buf2 + subarray(buf1, 0, m2)) ⊦ (n0 ≠ m4 → avol1[n0] = avol0[n0]) ∧ (n0 = m4 → buf0 + subarray(buf, 0, n) = buf2 + subarray(copy(buf, 0, buf1, m2, n), 0, m2 + n)) |
# avol0 = # avol1, # lpt0 = # avol1, # buf1 = EB_PAGE_SIZE, avol0[m4] = mapped(buf2), avol1[m4] = mapped(buf2 + subarray(buf1, 0, m2)), m2 < EB_PAGE_SIZE, m2 + n < EB_PAGE_SIZE, m4 < # avol1, awbuf-inv(avol1, buffered(m4)), ebm-vol-inv(avol0), is-aligned(# buf2, EB_PAGE_SIZE), n ≤ # buf, # buf2 + m2 + n ≤ LEB_SIZE, (# buf2 + m2) + n ≤ LEB_SIZE ⊦ subarray(buf1, 0, m2) + subarray(buf, 0, n) = subarray(copy(buf, 0, buf1, m2, n), 0, m2 + n)
Used simplifier rules: a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic% ⊦ # subarray(buf, m, n) = n; (s)% ⊦ #(buf + buf0) = # buf + # buf0; (s)%append-a: ⊦ (buf + buf0) + buf1 = buf + buf0 + buf1; from specification array-splice[buffer]% ⊦ buf + buf0 = buf + buf1 ↔ buf0 = buf1; (s)%lf-02: ⊦ m < n ∧ m = n0 → n0 < n; (forward) from specification nat-basic