| 2 * EB_PAGE_SIZE = (avhdr = empty ⊃ EB_PAGE_SIZE;2 * EB_PAGE_SIZE), LEB_SIZE = n1 + 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, n2 < n, n2 < LEB_SIZE, n2 < # buf, n2 < datasize(buf, n), n0 < n1, m1 < # pebs, 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), mtd-valid-peb(pebs[m1]), ubi-io-inv(apebs), 2 * EB_PAGE_SIZE + n2 ≤ PEB_SIZE, n ≤ LEB_SIZE, n ≤ # buf, ⌊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, 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, n2 < n, n2 < LEB_SIZE, n2 < # buf, n2 < datasize(buf, n), n0 < n1, m1 < # pebs, 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), range=(buf0, 2 * EB_PAGE_SIZE, emptypeb, 2 * EB_PAGE_SIZE, PEB_SIZE - 2 * EB_PAGE_SIZE), ubi-io-inv(apebs), 2 * EB_PAGE_SIZE + n2 ≤ PEB_SIZE, n ≤ LEB_SIZE, n ≤ # buf, 2 * EB_PAGE_SIZE ≤ PEB_SIZE, ⌊err1⌋ ⊦ buf0[(2 * EB_PAGE_SIZE + n2) + n0] = empty, aehdr = empty, n2 = 0
Used simplifier rules: mult-c: ⊦ m * n = n * m; from specification nat-mult%mult-a: ⊦ m0 * m * n = (m0 * m) * n; from specification nat-mult%n ≠ 0 ⊦ is-aligned(n0 * n, n); (s)% ⊦ EB_PAGE_SIZE ≠ 0; (s)% ⊦ mkpeb(buf, m, boolvar).fill = m; (s)% ⊦ mkpeb(buf, m, boolvar).bad ↔ boolvar; (s)%n < # pebs ⊦ pebs[n] = mkpeb(buf, m, boolvar) ∧ mtd-cons(pebs) → # buf = PEB_SIZE; (s)% ⊦ m < n → (n ≤ m ↔ false); (s)% ⊦ m < n ↔ ¬ n ≤ m; (ss)% ⊦ mkpeb(buf, m, boolvar).data = buf; (s)%⊦ mtd-valid-peb(peb) ↔ # peb.data = PEB_SIZE ∧ ( ¬ peb.bad → peb.fill ≤ PEB_SIZE ∧ is-aligned(peb.fill, EB_PAGE_SIZE) ∧ range= (peb.data, peb.fill, emptypeb, peb.fill, PEB_SIZE - peb.fill)); (s)