| # buf = (n2 + n1) * LEB_SIZE, avol[n3 + n1] = mapped(buf0), subarray(buf, 0, n1 * LEB_SIZE) = lebs(avol, n3, n1), n3 + n1 < # avol, ebm-vol-inv(avol), mapped-full?(avol, n3, n2 + n1), 1 ≤ n2, # buf0 ≤ LEB_SIZE, LEB_SIZE ≤ # buf0 + (LEB_SIZE - # buf0), n3 + n2 + n1 ≤ # avol, n1 * LEB_SIZE + LEB_SIZE ≤ # buf ⊦ n2 = 0, subarray(copy(buf0 + mkempbuf(LEB_SIZE - # buf0), 0, buf, n1 * LEB_SIZE, LEB_SIZE), 0, LEB_SIZE * n1 + LEB_SIZE) = lebs(avol, n3, n1 + 1) |
⊦ n1 ≤ # buf ∧ n0 + n1 ≤ # buf0 → copy(buf, 0, buf0, n0, n1) = subarray(buf0, 0, n0) + subarray(buf, 0, n1) + subarray(buf0, n0 + n1, # buf0 - n0 - n1)
# buf = (n2 + n1) * LEB_SIZE, avol[n3 + n1] = mapped(buf0), subarray(buf, 0, n1 * LEB_SIZE) = lebs(avol, n3, n1), n3 + n1 < # avol, ebm-vol-inv(avol), mapped-full?(avol, n3, n2 + n1), n3 + n2 + n1 ≤ # avol, LEB_SIZE ≤ # buf0 + (LEB_SIZE - # buf0), # buf0 ≤ LEB_SIZE, 1 ≤ n2, LEB_SIZE ≤ #(buf0 + mkempbuf(LEB_SIZE - # buf0)), n1 * LEB_SIZE + LEB_SIZE ≤ # buf ⊦ n2 = 0, subarray ( subarray(buf, 0, n1 * LEB_SIZE) + subarray(buf0 + mkempbuf(LEB_SIZE - # buf0), 0, LEB_SIZE) + subarray(buf, n1 * LEB_SIZE + LEB_SIZE, # buf - n1 * LEB_SIZE - LEB_SIZE), 0, LEB_SIZE * n1 + LEB_SIZE) = lebs(avol, n3, n1 + 1)
Used simplifier rules: ⊦ #(buf + buf0) = # buf + # buf0; (s)% ⊦ # mkempbuf(n) = n; (s)%append-a: ⊦ (buf + buf0) + buf1 = buf + buf0 + buf1; from specification array-splice[buffer] Used terms: LEB_SIZE, n1 * LEB_SIZE, buf, buf0 + mkempbuf(LEB_SIZE - # buf0)