| 2 * EB_PAGE_SIZE = (avhdr = empty ⊃ EB_PAGE_SIZE;2 * EB_PAGE_SIZE), LEB_SIZE = n1 + n2, PEB_SIZE = n3 + 2 * EB_PAGE_SIZE, 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?, m1 < # pebs, n0 < n1, n2 < datasize(buf, n), n2 < # buf, n2 < LEB_SIZE, n2 < n, 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), range=(buf0, 2 * EB_PAGE_SIZE, emptypeb, 2 * EB_PAGE_SIZE, n3), ubi-io-inv(apebs), 2 * EB_PAGE_SIZE ≤ PEB_SIZE, n ≤ # buf, n ≤ LEB_SIZE, 2 * EB_PAGE_SIZE + n2 ≤ PEB_SIZE, ⌊err1⌋ ⊦ buf0[(2 * EB_PAGE_SIZE + n2) + n0] = empty, aehdr = empty, n2 = 0 |
2 * EB_PAGE_SIZE = (avhdr = empty ⊃ EB_PAGE_SIZE;2 * EB_PAGE_SIZE), LEB_SIZE = n1 + 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?, m1 < # pebs, n0 < n1, n2 < datasize(buf, n), n2 < # buf, n2 < LEB_SIZE, n2 < n, 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), range=(buf0, 2 * EB_PAGE_SIZE, emptypeb, 2 * EB_PAGE_SIZE, LEB_SIZE), ubi-io-inv(apebs), 2 * EB_PAGE_SIZE ≤ PEB_SIZE, n ≤ # buf, n ≤ LEB_SIZE, 2 * EB_PAGE_SIZE + n2 ≤ PEB_SIZE, ⌊err1⌋ ⊦ buf0[(2 * EB_PAGE_SIZE + n2) + n0] = empty, aehdr = empty, n2 = 0
Used simplifier rules: ⊦ LEB_SIZE + 2 * EB_PAGE_SIZE = PEB_SIZE; (s)%c: ⊦ m + n = n + m; from specification nat-basic%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic%mult-c: ⊦ m * n = n * m; from specification nat-mult%mult-a: ⊦ m0 * m * n = (m0 * m) * n; from specification nat-mult%pebsize-minus-2eb-page-size: ⊦ PEB_SIZE = n + 2 * EB_PAGE_SIZE → n = LEB_SIZE; (forward) from specification eraseblock