| # 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, 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)]), 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 ⊦ [pebs := 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 ]] ( mtd-cons(pebs) → ⟪m1 := m1 + 1⟫ ( m1 ≤ # pebs0 ∧ # pebs0 = # pebs ∧ (err = ESUCCESS → ubi-io-initial(subarray(pebs, 0, m1))) ∧ (err = ESUCCESS ∨ ⌊err⌋ ) ∧ # pebs0 < n + m1)), n = 0 |
# buf1 = EB_PAGE_SIZE, # pebs1 = n + m1, # pebs0 = n + m1, pebs1[m1] = mkpeb(buf0, m2, false), err = ESUCCESS, err = err0, pebs = pebs1[m1, mkpeb(emptypeb, 0, false)], m1 < # pebs[m1, pebs[m1].data:= copy(buf1, 0, pebs[m1].data, 0, EB_PAGE_SIZE)], m1 < # pebs1, m1 < # pebs, is-encoded(echdr((err1 = ESUCCESS ∧ aehdr0.valid? ⊃ aehdr0.ec + 1;0)), buf1), 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 ]), 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, 0 + EB_PAGE_SIZE ≤ # pebs[m1].data, 0 + EB_PAGE_SIZE ≤ # buf1, ⌊err0⌋ ∨ err0 = ESUCCESS ⊦ ⟪m := m1 + 1⟫ ( m ≤ # 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, m))) ∧ (err = ESUCCESS ∨ ⌊err⌋ ) ∧ # pebs0 < n + m), n = 0