| # buf1 = EB_PAGE_SIZE, # pebs1 = n + m1, # pebs0 = n + m1, pebs1[m1] = mkpeb(buf0, m2, false), is-encoded(echdr((err1 = ESUCCESS ∧ aehdr0.valid? ⊃ aehdr0.ec + 1;0)), buf1), mtd-cons(pebs1[m1, mkpeb(copy(buf1, 0, emptypeb, 0, EB_PAGE_SIZE), EB_PAGE_SIZE, false)]), mtd-cons(pebs1[m1, mkpeb(emptypeb, 0, false)]), mtd-cons(pebs1), mtd-cons(pebs0), ubi-io-initial(subarray(pebs1, 0, m1)), EB_PAGE_SIZE ≤ PEB_SIZE ⊦ n = 0, mtd-valid-peb(mkpeb(copy(buf1, 0, emptypeb, 0, EB_PAGE_SIZE), EB_PAGE_SIZE, false)) ∧ ( ¬ mkpeb(copy(buf1, 0, emptypeb, 0, EB_PAGE_SIZE), EB_PAGE_SIZE, false).bad → mkpeb(copy(buf1, 0, emptypeb, 0, EB_PAGE_SIZE), EB_PAGE_SIZE, false).fill = EB_PAGE_SIZE ∧ (∃ n. is-encoded(echdr(n), subarray(mkpeb(copy(buf1, 0, emptypeb, 0, EB_PAGE_SIZE), EB_PAGE_SIZE, false).data, 0, EB_PAGE_SIZE)))) |
# pebs0 = n + m1, # pebs1 = n + m1, # buf1 = EB_PAGE_SIZE, pebs1[m1] = mkpeb(buf0, m2, false), is-encoded(echdr((err1 = ESUCCESS ∧ aehdr0.valid? ⊃ aehdr0.ec + 1;0)), buf1), mtd-cons(pebs0), mtd-cons(pebs1), mtd-cons(pebs1[m1, mkpeb(emptypeb, 0, false)]), mtd-cons(pebs1[m1, mkpeb(copy(buf1, 0, emptypeb, 0, EB_PAGE_SIZE), EB_PAGE_SIZE, false)]), ubi-io-initial(subarray(pebs1, 0, m1)), EB_PAGE_SIZE ≤ PEB_SIZE ⊦ n = 0, range=(copy(buf1, 0, emptypeb, 0, EB_PAGE_SIZE), EB_PAGE_SIZE, emptypeb, EB_PAGE_SIZE, PEB_SIZE - EB_PAGE_SIZE)
Used simplifier rules: ⊦ echdr(m) = echdr(m0) ↔ m = m0; (s)% ⊦ is-encoded(ehdr, buf) → (is-encoded(ehdr0, buf) ↔ ehdr = ehdr0); (s)%# buf = n ⊦ subarray(buf, 0, n) = buf; (s)%m1 + n ≤ # buf ⊦ subarray(copy(buf0, m0, buf, m1, n), m1, n) = subarray(buf0, m0, n); (s)% ⊦ ¬ PEB_SIZE < EB_PAGE_SIZE; (s)% ⊦ m ≤ n ↔ ¬ n < m; (ss)%c: ⊦ m + n = n + m; from specification nat-basic%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic% ⊦ n + 0 = n; (s)%n ≠ 0 ⊦ is-aligned(n, n); (s)% ⊦ EB_PAGE_SIZE ≠ 0; (s)% ⊦ mkpeb(buf, m, boolvar).fill = m; (s)% ⊦ mkpeb(buf, m, boolvar).bad ↔ boolvar; (s)% ⊦ # emptypeb = PEB_SIZE; (s)% ⊦ # copy(buf, m, buf0, m0, n) = # buf0; (s)% ⊦ 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)