| # buf = (n2 + n1) * LEB_SIZE, avol[n3 + n1] = mapped(buf0), err = ESUCCESS, err = err0, 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), n1 * LEB_SIZE + LEB_SIZE ≤ # buf, n3 + n2 + n1 ≤ # avol, 0 + LEB_SIZE ≤ #(avol[n3 + n1].data + mkempbuf(LEB_SIZE - # avol[n3 + n1].data)), LEB_SIZE ≥ # avol[n3 + n1].data, ⌊err0⌋ ∨ err0 = ESUCCESS ⊦ n2 = 0, n1 + 1 ≤ 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, (n1 + 1) * LEB_SIZE) = lebs(avol, n3, n1 + 1)) ∧ n1 < n1 + 1 |
# 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)
Used simplifier rules: not-zero: 0 < n ⊦ (* n) ≤ m → m ≠ 0; (forward) from specification nat% ⊦ m < 1 ↔ m = 0; (s)% ⊦ m ≤ n ↔ ¬ n < m; (ss)% ⊦ m ≤ m + n; (s)% ⊦ mapped(buf).data = buf; (s)% ⊦ mapped(buf) = mapped(buf0) ↔ buf = buf0; (s)%let: ⊦ n ≤ n0 ∧ n0 ≤ n1 → n ≤ n1; (forward) from specification nat% ⊦ ¬ n < n; (s)% ⊦ m < n + 1 ↔ ¬ n < m; (s)%mult-c: ⊦ m * n = n * m; from specification nat-mult%mult-a: ⊦ m0 * m * n = (m0 * m) * n; from specification nat-mult% ⊦ m * (n + 1) = m * n + m; (s)% ⊦ # copy(buf, m, buf0, m0, n) = # buf0; (s)% ⊦ m + n ≤ m + n0 ↔ n ≤ n0; (s)% ⊦ ¬ ⌊ESUCCESS⌋ ; (s)% ⊦ aleb.mapped? ↔ (∃ buf. aleb = mapped(buf)); (as)%append-a: ⊦ (buf + buf0) + buf1 = buf + buf0 + buf1; from specification array-splice[buffer]% ⊦ # mkempbuf(n) = n; (s)% ⊦ #(buf + buf0) = # buf + # buf0; (s)%c: ⊦ m + n = n + m; from specification nat-basic%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic% ⊦ n + 0 = n; (s)% ⊦ n ≥ m ↔ m ≤ n; (s)