| err0 = ESUCCESS, m2 < # avols[v], ebm-cons(avols), is-aligned(m1, EB_PAGE_SIZE), is-aligned(n, EB_PAGE_SIZE), v ∈ avols, n2 + n ≤ # buf, m1 + n ≤ LEB_SIZE, n + n2 ≤ # buf, LEB_SIZE - m1 ≥ n, LEB_SIZE ≥ m1, avols[v][m2].mapped? → avols[v][m2].fill ≤ m1, ⌊err0⌋ ∨ err0 = ESUCCESS ⊦ avols[v][m2].mapped?, ebm-cons(avols[v, avols[v][m2, mapped(mkempbuf(m1) + subarray(buf, n2, n) + mkempbuf(LEB_SIZE - m1 - n), m1 + n)]]) |
m2 < # avols[v], ebm-cons(avols), is-aligned(n, EB_PAGE_SIZE), is-aligned(m1, EB_PAGE_SIZE), v ∈ avols, n + n2 ≤ # buf, m1 + n ≤ LEB_SIZE, n2 + n ≤ # buf, m1 ≤ LEB_SIZE, n + m1 ≤ LEB_SIZE ⊦ avols[v][m2].mapped?, range=(mkempbuf(m1) + subarray(buf, n2, n) + mkempbuf(LEB_SIZE - m1 - n), m1 + n, emptyleb, 0, LEB_SIZE - m1 + n)
Used simplifier rules: ⊦ ¬ ⌊ESUCCESS⌋ ; (s)%m ≠ 0, is-aligned(n1, m) ⊦ is-aligned(n0 + n1, m) ↔ is-aligned(n0, m); (s)% ⊦ EB_PAGE_SIZE ≠ 0; (s)% ⊦ mapped(buf, m).fill = m; (s)% ⊦ m + n = m + n0 ↔ n = n0; (s)%c: ⊦ m + n = n + m; from specification nat-basic%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic% ⊦ n ≤ n0 → (m + (n0 - n)) + n = m + n0; (s)%n ≤ m ⊦ (m - n) + n0 = n1 ↔ m + n0 = n + n1; (s)%append-a: ⊦ (buf + buf0) + buf1 = buf + buf0 + buf1; from specification array-splice[buffer]% ⊦ # subarray(buf, m, n) = n; (s)% ⊦ # mkempbuf(n) = n; (s)% ⊦ #(buf + buf0) = # buf + # buf0; (s)% ⊦ mapped(buf, m).data = buf; (s)% ⊦ mapped(buf, m).mapped?; (s)%⊦ valid-leb(leb) ↔ leb.mapped? → # leb.data = LEB_SIZE ∧ leb.fill ≤ LEB_SIZE ∧ is-aligned(leb.fill, EB_PAGE_SIZE) ∧ range=(leb.data, leb.fill, emptyleb, 0, LEB_SIZE - leb.fill); (s)%⊦ v ∈ avols ∧ m < # avols[v] ∧ ebm-cons(avols) → ( ebm-cons(avols[v, avols[v][m, leb]]) ↔ valid-leb(avols[v][m]) → valid-leb(leb)); (ss)%n0 ≤ n ⊦ m ≤ n - n0 ↔ m + n0 ≤ n; (s)% ⊦ m ≤ n → (n < m ↔ false); (s)% ⊦ m ≤ n ↔ ¬ n < m; (ss)% ⊦ n ≥ m ↔ m ≤ n; (s)