| # avol0 = # avol1, # lpt0 = # avol1, # buf1 = EB_PAGE_SIZE, avol0[m4] = mapped(buf2), avol1[m4] = mapped(buf), align↓(m2 + n3, EB_PAGE_SIZE) = n + m2, n0 < # avol1, m2 < EB_PAGE_SIZE, m4 < # avol1, awbuf-inv(avol1, buffered(m4)), ebm-vol-inv(avol0), is-aligned(n + m2, EB_PAGE_SIZE), is-aligned(# buf2, EB_PAGE_SIZE), # buf + n3 ≤ LEB_SIZE, n3 ≤ # buf3, EB_PAGE_SIZE ≤ m2 + n3, # buf2 + m2 + n3 ≤ LEB_SIZE, n ≤ # buf3, # buf2 + n + m2 ≤ LEB_SIZE, n + (m2 + n3) % EB_PAGE_SIZE ≤ # buf3, n0 < # avol1 → (n0 ≠ m4 → avol1[n0] = avol0[n0]) ∧ (n0 = m4 → buf = buf2 + subarray(buf1, 0, m2)) ⊦ n + m2 = 0, n3 = 0, (n0 ≠ m4 → avol1[n0] = avol0[n0]) ∧ ( n0 = m4 → buf + subarray(buf3, 0, n3) = (buf2 + copy(buf3, 0, copy(buf1, 0, mkbuf(n + m2), 0, m2), m2, n)) + subarray(buf3, n, (m2 + n3) % EB_PAGE_SIZE)) |
# avol0 = # avol1, # lpt0 = # avol1, # buf1 = EB_PAGE_SIZE, avol0[m4] = mapped(buf2), avol1[m4] = mapped(buf2 + subarray(buf1, 0, m2)), align↓(m2 + n3, EB_PAGE_SIZE) = n + m2, m2 < EB_PAGE_SIZE, m4 < # avol1, awbuf-inv(avol1, buffered(m4)), ebm-vol-inv(avol0), is-aligned(n + m2, EB_PAGE_SIZE), is-aligned(# buf2, EB_PAGE_SIZE), n3 ≤ # buf3, EB_PAGE_SIZE ≤ m2 + n3, # buf2 + m2 + n3 ≤ LEB_SIZE, n ≤ # buf3, # buf2 + n + m2 ≤ LEB_SIZE, n + (m2 + n3) % EB_PAGE_SIZE ≤ # buf3, (# buf2 + m2) + n3 ≤ LEB_SIZE ⊦ n + m2 = 0, subarray(buf1, 0, m2) + subarray(buf3, 0, n3) = copy(buf3, 0, copy(buf1, 0, mkbuf(n + m2), 0, m2), m2, n) + subarray(buf3, n, (m2 + n3) % EB_PAGE_SIZE), n3 = 0
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