| # wlar = # apebs1, # buf1 = LEB_SIZE, wlar[vtblpnum2] = wl-entry(m, stat), apebs1[vtblpnum2] = mkpeb(aehdr, empty, buf0, 0, false), aehdr.valid?, vtblpnum2 < # apebs1, is-aligned(LEB_SIZE, EB_PAGE_SIZE), is-encoded(∅, buf1), ubi-io-initial(apebs1), ubi-io-inv(apebs1[vtblpnum2, mkpeb(aehdr, avidhdr(VTBL_VOLID, VTBL_LNUM, 0, 0, 0), buf0, 0, false)]), ubi-io-inv(apebs1[vtblpnum2, mkpeb(aehdr, avidhdr(VTBL_VOLID, VTBL_LNUM, 0, 0, 0), buf1, LEB_SIZE, false)]), ENCODED_NAT_SIZE ≤ LEB_SIZE, ∀ n3. n3 < # apebs1 → (apebs1[n3].bad → wlar[n3] = wl-entry(0, erroneous)) ∧ (¬ apebs1[n3].bad → apebs1[n3].echdr.valid? ∧ wlar[n3] = wl-entry(apebs1[n3].echdr.ec, free) ∧ apebs1[n3].vidhdr = empty) ⊦ vtblpnum2 = # apebs1, ∀ n. n < # wlar[vtblpnum2, wl-entry(m, used)] → ( wlar[vtblpnum2, wl-entry(m, used)][n].status = erroneous ↔ apebs1[vtblpnum2, mkpeb(aehdr, avidhdr(VTBL_VOLID, VTBL_LNUM, 0, 0, 0), buf1, LEB_SIZE, false)][n].bad) ∧ ( wlar[vtblpnum2, wl-entry(m, used)][n].status = free → apebs1[vtblpnum2, mkpeb(aehdr, avidhdr(VTBL_VOLID, VTBL_LNUM, 0, 0, 0), buf1, LEB_SIZE, false)][n].vidhdr = empty) ∧ ( wlar[vtblpnum2, wl-entry(m, used)][n].status ≠ erroneous ∧ wlar[vtblpnum2, wl-entry(m, used)][n].status ≠ erasing → apebs1[vtblpnum2, mkpeb(aehdr, avidhdr(VTBL_VOLID, VTBL_LNUM, 0, 0, 0), buf1, LEB_SIZE, false)][n].echdr = aechdr(wlar[vtblpnum2, wl-entry(m, used)][n].ec)) ∧ ( wlar[vtblpnum2, wl-entry(m, used)][n].status = used → (∃ v, m. valid-peb(v, m, apebs1[vtblpnum2, mkpeb(aehdr, avidhdr(VTBL_VOLID, VTBL_LNUM, 0, 0, 0), buf1, LEB_SIZE, false)][n]) ∧ apebs1[vtblpnum2, mkpeb(aehdr, avidhdr(VTBL_VOLID, VTBL_LNUM, 0, 0, 0), buf1, LEB_SIZE, false)][n].vidhdr.sqn = valid-sqns(v, m, apebs1[vtblpnum2, mkpeb(aehdr, avidhdr(VTBL_VOLID, VTBL_LNUM, 0, 0, 0), buf1, LEB_SIZE, false)]).max)) |
# wlar = # apebs1, # buf1 = LEB_SIZE, wlar[vtblpnum2] = wl-entry(m, stat), apebs1[vtblpnum2] = mkpeb(aehdr, empty, buf0, 0, false), aehdr.valid?, n < # apebs1, vtblpnum2 < # apebs1, is-aligned(LEB_SIZE, EB_PAGE_SIZE), is-encoded(∅, buf1), ubi-io-initial(apebs1), ubi-io-inv(apebs1[vtblpnum2, mkpeb(aehdr, avidhdr(VTBL_VOLID, VTBL_LNUM, 0, 0, 0), buf0, 0, false)]), ubi-io-inv(apebs1[vtblpnum2, mkpeb(aehdr, avidhdr(VTBL_VOLID, VTBL_LNUM, 0, 0, 0), buf1, LEB_SIZE, false)]), ENCODED_NAT_SIZE ≤ LEB_SIZE, ∀ n3. n3 < # apebs1 → (apebs1[n3].bad → wlar[n3] = wl-entry(0, erroneous)) ∧ (¬ apebs1[n3].bad → apebs1[n3].echdr.valid? ∧ wlar[n3] = wl-entry(apebs1[n3].echdr.ec, free) ∧ apebs1[n3].vidhdr = empty) ⊦ vtblpnum2 = # apebs1, ( wlar[vtblpnum2, wl-entry(m, used)][n].status = erroneous ↔ apebs1[vtblpnum2, mkpeb(aehdr, avidhdr(VTBL_VOLID, VTBL_LNUM, 0, 0, 0), buf1, LEB_SIZE, false)][n].bad) ∧ (wlar[vtblpnum2, wl-entry(m, used)][n].status = free → apebs1[n].vidhdr = empty) ∧ ( wlar[vtblpnum2, wl-entry(m, used)][n].status ≠ erroneous ∧ wlar[vtblpnum2, wl-entry(m, used)][n].status ≠ erasing → apebs1[vtblpnum2, mkpeb(aehdr, avidhdr(VTBL_VOLID, VTBL_LNUM, 0, 0, 0), buf1, LEB_SIZE, false)][n].echdr = aechdr(wlar[vtblpnum2, wl-entry(m, used)][n].ec)) ∧ ( wlar[vtblpnum2, wl-entry(m, used)][n].status = used → (∃ v, m. valid-peb(v, m, apebs1[vtblpnum2, mkpeb(aehdr, avidhdr(VTBL_VOLID, VTBL_LNUM, 0, 0, 0), buf1, LEB_SIZE, false)][n]) ∧ apebs1[vtblpnum2, mkpeb(aehdr, avidhdr(VTBL_VOLID, VTBL_LNUM, 0, 0, 0), buf1, LEB_SIZE, false)][n].vidhdr.sqn = valid-sqns(v, m, apebs1[vtblpnum2, mkpeb(aehdr, avidhdr(VTBL_VOLID, VTBL_LNUM, 0, 0, 0), buf1, LEB_SIZE, false)]).max))
Used simplifier rules: lf-01: ⊦ m < n ∧ n = n0 → m < n0; (forward) from specification nat-basic%m ≠ n ⊦ apebs[m, apeb][n] = apebs[n]; (s)% ⊦ used ≠ free; (s)% ⊦ wl-entry(m, stat).status = stat; (s)% ⊦ m < # wlar → wlar[m, wle][m] = wle; (s)% ⊦ # wlar[n, wle] = # wlar; (s)