| 2 * EB_PAGE_SIZE = (avhdr = empty ⊃ EB_PAGE_SIZE;2 * EB_PAGE_SIZE), LEB_SIZE = n0 + n2, pebs[m1] = mkpeb(buf0, 2 * EB_PAGE_SIZE, false), apebs[m1] = mkpeb(aehdr, avhdr, subarray(buf0, 2 * EB_PAGE_SIZE, LEB_SIZE), 0, false), n = align↑(datasize(buf, n), EB_PAGE_SIZE), avhdr.valid?, aehdr.valid?, m1 < # apebs, m1 < # pebs, n2 < n, n2 < LEB_SIZE, n2 < # buf, n2 < datasize(buf, n), abs(pebs, apebs), abs-echdr(subarray(buf0, 0, EB_PAGE_SIZE), aehdr), abs-vidhdr(subarray(buf0, EB_PAGE_SIZE, EB_PAGE_SIZE), avhdr), is-aligned(n2, EB_PAGE_SIZE), is-aligned(n, EB_PAGE_SIZE), mtd-cons(pebs), ubi-io-inv(apebs), 2 * EB_PAGE_SIZE + n2 ≤ PEB_SIZE, n ≤ LEB_SIZE, n ≤ # buf, ⌊err1⌋ ⊦ aehdr = empty, n0 = 0, n2 = 0, subarray(copy(buf, 0, buf0, 2 * EB_PAGE_SIZE, n2), 2 * EB_PAGE_SIZE, LEB_SIZE) = subarray(buf, 0, n2) + mkempbuf(n0) |
n1 ≥ m0, m0 + m1 ≤ # buf ⊦ subarray(copy(buf0, n0, buf, n1, n2), m0, m1) = copy(buf0, n0, subarray(buf, m0, m1), n1 - m0, n2)
2 * EB_PAGE_SIZE = (avhdr = empty ⊃ EB_PAGE_SIZE;2 * EB_PAGE_SIZE), LEB_SIZE = n0 + n2, apebs[m1] = mkpeb(aehdr, avhdr, subarray(buf0, 2 * EB_PAGE_SIZE, LEB_SIZE), 0, false), pebs[m1] = mkpeb(buf0, 2 * EB_PAGE_SIZE, false), n = align↑(datasize(buf, n), EB_PAGE_SIZE), aehdr.valid?, avhdr.valid?, n2 < datasize(buf, n), n2 < # buf, n2 < LEB_SIZE, n2 < n, m1 < # pebs, m1 < # apebs, abs(pebs, apebs), abs-echdr(subarray(buf0, 0, EB_PAGE_SIZE), aehdr), abs-vidhdr(subarray(buf0, EB_PAGE_SIZE, EB_PAGE_SIZE), avhdr), is-aligned(n, EB_PAGE_SIZE), is-aligned(n2, EB_PAGE_SIZE), mtd-cons(pebs), ubi-io-inv(apebs), n ≤ # buf, n ≤ LEB_SIZE, 2 * EB_PAGE_SIZE + n2 ≤ PEB_SIZE, 2 * EB_PAGE_SIZE + LEB_SIZE ≤ # buf0, 2 * EB_PAGE_SIZE ≥ 2 * EB_PAGE_SIZE, ⌊err1⌋ ⊦ aehdr = empty, copy(buf, 0, subarray(buf0, 2 * EB_PAGE_SIZE, LEB_SIZE), 2 * EB_PAGE_SIZE - 2 * EB_PAGE_SIZE, n2) = subarray(buf, 0, n2) + mkempbuf(n0), n0 = 0, n2 = 0
Used simplifier rules: ⊦ n ≥ m ↔ m ≤ n; (s)%0 ≠ m ⊦ (* m) * n ≤ m * n0 ↔ n ≤ n0; (s)% ⊦ m ≤ m; (s)%mult-a: ⊦ m0 * m * n = (m0 * m) * n; from specification nat-mult%mult-c: ⊦ m * n = n * m; from specification nat-mult% ⊦ LEB_SIZE + 2 * EB_PAGE_SIZE = PEB_SIZE; (s)%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic%c: ⊦ m + n = n + m; from specification nat-basic% ⊦ m < n ↔ ¬ n ≤ m; (ss)% ⊦ m < n → (n ≤ m ↔ false); (s)%n < # pebs ⊦ pebs[n] = mkpeb(buf, m, boolvar) ∧ mtd-cons(pebs) → # buf = PEB_SIZE; (s) Used terms: LEB_SIZE, 2 * EB_PAGE_SIZE, n2, 2 * EB_PAGE_SIZE, buf0, 0, buf