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