| apebs[m] = mkpeb(aehdr, avhdr, buf0, 0, false), n1 = align↑(datasize(buf, n1), EB_PAGE_SIZE), avhdr.valid?, aehdr.valid?, m < # apebs, ubi-io-peb-inv(mkpeb(aehdr, avhdr, buf0, 0, false)), n1 ≤ # buf, n1 ≤ LEB_SIZE ⊦ buf0 = mkempbuf(LEB_SIZE), datasize(buf, n1) = 0 |
⊦ ubi-io-peb-inv(apeb) ↔ # apeb.data = LEB_SIZE ∧ ( ¬ apeb.bad → (apeb.echdr = empty → apeb.vidhdr = empty) ∧ (apeb.echdr ≠ garbage ∧ apeb.vidhdr = empty → apeb.fill = 0) ∧ apeb.fill ≤ LEB_SIZE ∧ is-aligned(apeb.fill, EB_PAGE_SIZE) ∧ subarray(apeb.data, apeb.fill, LEB_SIZE - apeb.fill) = mkempbuf(LEB_SIZE - apeb.fill))
Used simplifier rules: ⊦ mkpeb(aehdr, avhdr, buf, m, boolvar).data = buf; (s)% ⊦ mkpeb(aehdr, avhdr, buf, m, boolvar).bad ↔ boolvar; (s)% ⊦ mkpeb(aehdr, avhdr, buf, m, boolvar).echdr = aehdr; (s)% ⊦ mkpeb(aehdr, avhdr, buf, m, boolvar).vidhdr = avhdr; (s)% ⊦ mkpeb(aehdr, avhdr, buf, m, boolvar).fill = m; (s)% ⊦ 0 ≤ m; (s)% ⊦ EB_PAGE_SIZE ≠ 0; (s)%n ≠ 0 ⊦ is-aligned(0, n); (s)% ⊦ m - 0 = m; (s)%# buf = n ⊦ subarray(buf, 0, n) = buf; (s) Used terms: mkpeb(aehdr, avhdr, buf0, 0, false)