| # buf = m2 * LEB_SIZE, # avol = # avol1, lebs(avol, n0, n1) = subarray(buf, 0, n1 * LEB_SIZE), n1 < m2, ebm-vol-inv(avol1), ebm-vol-inv(avol), mapped-full?(avol, n0, n1), range=(avol, 0, avol1, 0, n0), range=(avol, n0 + m2, avol1, n0 + m2, # avol1 - n0 + m2), n0 + m2 ≤ # avol1 ⊦ ⟪ebm_avol_remap#(n0 + n1; avol; err); n := n1; if err = ESUCCESS then ebm_avol_write#(n0 + n, 0, n * LEB_SIZE, LEB_SIZE, buf; avol; err); n := n + 1⟫ ( n ≤ m2 ∧ ebm-vol-inv(avol) ∧ (err = ESUCCESS ∨ ⌊err⌋ ) ∧ # avol = # avol1 ∧ range=(avol, 0, avol1, 0, n0) ∧ range=(avol, n0 + m2, avol1, n0 + m2, # avol1 - n0 + m2) ∧ (err = ESUCCESS → lebs(avol, n0, n) = subarray(buf, 0, n * LEB_SIZE) ∧ mapped-full?(avol, n0, n)) ∧ m2 < (m2 - n1) + n) |
# avol = # avol1, # buf = m2 * LEB_SIZE, lebs(avol, n0, n1) = subarray(buf, 0, n1 * LEB_SIZE), m2 = n2 + n1, n1 < m2, ebm-vol-inv(avol), ebm-vol-inv(avol1), mapped-full?(avol, n0, n1), range=(avol, n0 + m2, avol1, n0 + m2, # avol1 - n0 + m2), range=(avol, 0, avol1, 0, n0), n0 + m2 ≤ # avol1, n1 ≤ m2 ⊦ ⟪ebm_avol_remap#(n0 + n1; avol; err); n := n1; if err = ESUCCESS then ebm_avol_write#(n0 + n, 0, n * LEB_SIZE, LEB_SIZE, buf; avol; err); n := n + 1⟫ ( n ≤ m2 ∧ ebm-vol-inv(avol) ∧ (err = ESUCCESS ∨ ⌊err⌋ ) ∧ # avol = # avol1 ∧ range=(avol, 0, avol1, 0, n0) ∧ range=(avol, n0 + m2, avol1, n0 + m2, # avol1 - n0 + m2) ∧ (err = ESUCCESS → lebs(avol, n0, n) = subarray(buf, 0, n * LEB_SIZE) ∧ mapped-full?(avol, n0, n)) ∧ m2 < n2 + n)
Used simplifier rules: ⊦ m * n = m * n0 ↔ m = 0 ∨ n = n0; (ws)% ⊦ LEB_SIZE ≠ 0; (s)%mult-a: ⊦ m0 * m * n = (m0 * m) * n; from specification nat-mult%mult-c: ⊦ m * n = n * m; from specification nat-mult% ⊦ m < n → m ≤ n; (s)%# buf = n ⊦ subarray(buf, 0, n) = buf; (s)%n ≤ m ⊦ n0 = m - n ↔ m = n0 + n; (elim) Used terms: m2, n1, n2