| # lpt = # avol, avol[m1] = mapped(buf0), align↓(# buf0 + n, EB_PAGE_SIZE) < # buf0, m1 < # avol, awbuf-inv(avol, buffered(m1)), avol0 ↓ avol[m1, mapped(buf0 + subarray(buf, 0, n))], EB_PAGE_SIZE ≤ # buf0 % EB_PAGE_SIZE + n, # buf0 + n ≤ LEB_SIZE, n ≤ # buf, ¬ is-aligned(# buf0 + n, EB_PAGE_SIZE) ⊦ ∃ err0. (⌊err0⌋ ∨ err0 = ESUCCESS) ∧ ⟨err := err0; let m = buffered(m1).leb in if err = ESUCCESS then avol[m] := mapped(avol[m].data + subarray(buf, 0, n)) else { choose n1 with n1 ≠ 0 ∧ n1 < n ∧ is-aligned(# avol[m].data + n1, EB_PAGE_SIZE) in avol[m] := mapped(avol[m].data + subarray(buf, 0, n1)) ifnone skip or skip; isbuf := true}⟩ (synced(avol) ∧ avol0 ↓ avol) |
m ≠ 0 ⊦ align↓(n0 + n1, m) < n0 ↔ n0 % m + n1 < m ∧ n0 % m ≠ 0
Used simplifier rules: ⊦ EB_PAGE_SIZE ≠ 0; (s)% ⊦ m < n → (n ≤ m ↔ false); (s) Used terms: EB_PAGE_SIZE, n, # buf0