| # buf = (n2 + n1) * LEB_SIZE, avol[n3 + n1] = mapped(buf0), err = ESUCCESS, err = err0, subarray(buf, 0, n1 * LEB_SIZE) = lebs(avol, n3, n1), n3 + n1 < # avol, ebm-vol-inv(avol), mapped-full?(avol, n3, n2 + n1), n1 * LEB_SIZE + LEB_SIZE ≤ # buf, n3 + n2 + n1 ≤ # avol, ⌊err0⌋ ∨ err0 = ESUCCESS ⊦ ⟪buf := copy(avol[n3 + n1].data + mkempbuf(LEB_SIZE - # avol[n3 + n1].data), 0, buf, n1 * LEB_SIZE, LEB_SIZE); n := n1 + 1⟫ ( n ≤ n2 + n1 ∧ # buf = (n2 + n1) * LEB_SIZE ∧ (err = ESUCCESS ∨ ⌊err⌋ ) ∧ (err = ESUCCESS → subarray(buf, 0, n * LEB_SIZE) = lebs(avol, n3, n)) ∧ n1 < n), n2 = 0 |
# buf = (n2 + n1) * LEB_SIZE, avol[n3 + n1] = mapped(buf0), err = err0, err = ESUCCESS, subarray(buf, 0, n1 * LEB_SIZE) = lebs(avol, n3, n1), avol[n3 + n1].mapped?, n3 + n1 < # avol, ebm-vol-inv(avol), mapped-full?(avol, n3, n2 + n1), 0 + LEB_SIZE ≤ #(avol[n3 + n1].data + mkempbuf(LEB_SIZE - # avol[n3 + n1].data)), n3 + n2 + n1 ≤ # avol, n1 * LEB_SIZE + LEB_SIZE ≤ # buf, LEB_SIZE ≥ # avol[n3 + n1].data, ⌊err0⌋ ∨ err0 = ESUCCESS ⊦ ⟪n := n1 + 1⟫ ( n ≤ n2 + n1 ∧ # copy(avol[n3 + n1].data + mkempbuf(LEB_SIZE - # avol[n3 + n1].data), 0, buf, n1 * LEB_SIZE, LEB_SIZE) = (n2 + n1) * LEB_SIZE ∧ (err = ESUCCESS ∨ ⌊err⌋ ) ∧ ( err = ESUCCESS → subarray(copy(avol[n3 + n1].data + mkempbuf(LEB_SIZE - # avol[n3 + n1].data), 0, buf, n1 * LEB_SIZE, LEB_SIZE), 0, n * LEB_SIZE) = lebs(avol, n3, n)) ∧ n1 < n), n2 = 0
Used simplifier rules: ⊦ ¬ ⌊ESUCCESS⌋ ; (s)% ⊦ n + 0 = n; (s)%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic%c: ⊦ m + n = n + m; from specification nat-basic% ⊦ #(buf + buf0) = # buf + # buf0; (s)% ⊦ # mkempbuf(n) = n; (s)%append-a: ⊦ (buf + buf0) + buf1 = buf + buf0 + buf1; from specification array-splice[buffer]% ⊦ n ≥ m ↔ m ≤ n; (s)% ⊦ mapped(buf).data = buf; (s)% ⊦ mapped(buf).mapped?; (s)% ⊦ m ≤ n ↔ ¬ n < m; (ss)% ⊦ ¬ n + (m - n) < m; (s)%⊦ n < # avol ∧ avol[n] = mapped(buf) ∧ ebm-vol-inv(avol) → ¬ LEB_SIZE < # buf; (s)