| # pebs = n0 + m1, # pebs0 = n0 + m1, pebs[m1] = mkpeb(buf, m, true), mtd-cons(pebs), mtd-cons(pebs0) ⊦ n0 = 0, ubi-io-peb-initial(mkpeb(buf, m, true)) |
⊦ ubi-io-peb-initial(peb) ↔ mtd-valid-peb(peb) ∧ (¬ peb.bad → peb.fill = EB_PAGE_SIZE ∧ (∃ n. is-encoded(echdr(n), subarray(peb.data, 0, EB_PAGE_SIZE))))
Used simplifier rules: ⊦ 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)% ⊦ mkpeb(buf, m, boolvar).data = buf; (s)% ⊦ m < n ↔ ¬ n ≤ m; (ss)% ⊦ m + m0 ≤ m ↔ m0 = 0; (s)%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic%c: ⊦ m + n = n + m; from specification nat-basic%n < # pebs ⊦ pebs[n] = mkpeb(buf, m, boolvar) ∧ mtd-cons(pebs) → # buf = PEB_SIZE; (s)% ⊦ mkpeb(buf, m, boolvar).bad ↔ boolvar; (s) Used terms: mkpeb(buf, m, true)