| # pebs0 = n + m1, # pebs1 = n + m1, # buf1 = EB_PAGE_SIZE, pebs1[m1] = mkpeb(buf0, m2, false), err = err0, err = ESUCCESS, pebs = pebs1[m1, mkpeb(emptypeb, 0, false)], m1 < # pebs, m1 < # pebs1, m1 < # pebs[m1, pebs[m1].data:= copy(buf1, 0, pebs[m1].data, 0, EB_PAGE_SIZE)], 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 (pebs[m1, pebs[m1].data:= copy(buf1, 0, pebs[m1].data, 0, EB_PAGE_SIZE)] [m1, pebs[m1, pebs[m1].data:= copy(buf1, 0, pebs[m1].data, 0, EB_PAGE_SIZE)][m1].fill:= EB_PAGE_SIZE ]), ubi-io-initial(subarray(pebs1, 0, m1)), 0 + EB_PAGE_SIZE ≤ # buf1, 0 + EB_PAGE_SIZE ≤ # pebs[m1].data, EB_PAGE_SIZE ≤ PEB_SIZE, ⌊err0⌋ ∨ err0 = ESUCCESS ⊦ n = 0, m1 + 1 ≤ # pebs0 ∧ # pebs0 = # pebs[m1, pebs[m1].data:= copy(buf1, 0, pebs[m1].data, 0, EB_PAGE_SIZE)] [m1, pebs[m1, pebs[m1].data:= copy(buf1, 0, pebs[m1].data, 0, EB_PAGE_SIZE)][m1].fill:= EB_PAGE_SIZE ] ∧ ( err = ESUCCESS → ubi-io-initial (subarray (pebs[m1, pebs[m1].data:= copy(buf1, 0, pebs[m1].data, 0, EB_PAGE_SIZE)] [m1, pebs[m1, pebs[m1].data:= copy(buf1, 0, pebs[m1].data, 0, EB_PAGE_SIZE)][m1].fill:= EB_PAGE_SIZE ], 0, m1 + 1))) ∧ (err = ESUCCESS ∨ ⌊err⌋ ) ∧ # pebs0 < n + m1 + 1 |
# 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, ubi-io-initial(subarray(pebs1[m1, mkpeb(copy(buf1, 0, emptypeb, 0, EB_PAGE_SIZE), EB_PAGE_SIZE, false)], 0, m1 + 1))
Used simplifier rules: ⊦ ¬ n < n; (s)% ⊦ m + n < m + n0 ↔ n < n0; (s)% ⊦ m ≤ m; (s)% ⊦ m < m + n ↔ n ≠ 0; (s)% ⊦ m < n + 1 ↔ ¬ n < m; (s)% ⊦ m + 1 ≤ n ↔ m < n; (s)% ⊦ ¬ ⌊ESUCCESS⌋ ; (s)% ⊦ # pebs[n, peb] = # pebs; (s)% ⊦ mkpeb(buf, m, boolvar).fill:= m0 = mkpeb(buf, m0, boolvar); (s)%m < # pebs ⊦ pebs[m, peb][m, peb0] = pebs[m, peb0]; (s)% ⊦ m + m0 ≤ m ↔ m0 = 0; (s)% ⊦ m < n ↔ ¬ n ≤ m; (ss)% ⊦ mkpeb(buf, m, boolvar).data:= buf0 = mkpeb(buf0, m, boolvar); (s)% ⊦ # emptypeb = PEB_SIZE; (s)% ⊦ mkpeb(buf, m, boolvar).data = buf; (s)% ⊦ m < # pebs → pebs[m, peb][m] = peb; (s)%c: ⊦ m + n = n + m; from specification nat-basic%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic% ⊦ n + 0 = n; (s)