| # lpt = # avol, # buf0 + n0 = align↓(# buf0 + n, EB_PAGE_SIZE), avol[m1] = mapped(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) ⊦ n0 ≠ 0 ∧ n0 < n ∧ is-aligned(# avol[m1].data + n0, EB_PAGE_SIZE) ∧ ⟨avol[buffered(m1).leb] := mapped(avol[buffered(m1).leb].data + subarray(buf, 0, n0)); isbuf := true⟩ (synced(avol) ∧ avol0 ↓ avol) |
# lpt = # avol, # buf0 + n0 = align↓(# buf0 + n, EB_PAGE_SIZE), avol[m1] = mapped(buf0), m1 < # avol, awbuf-inv(avol, buffered(m1)), avol0 ↓ avol[m1, mapped(buf0 + subarray(buf, 0, n))], n ≤ # buf, # buf0 + n ≤ LEB_SIZE, EB_PAGE_SIZE ≤ # buf0 % EB_PAGE_SIZE + n ⊦ n0 < n, is-aligned(# buf0 + n, EB_PAGE_SIZE)
# lpt = # avol, # buf0 + n0 = align↓(# buf0 + n, EB_PAGE_SIZE), avol[m1] = mapped(buf0), m1 < # avol, awbuf-inv(avol, buffered(m1)), avol0 ↓ avol[m1, mapped(buf0 + subarray(buf, 0, n))], n ≤ # buf, # buf0 + n ≤ LEB_SIZE, EB_PAGE_SIZE ≤ # buf0 % EB_PAGE_SIZE + n ⊦ ⟨avol[buffered(m1).leb] := mapped(avol[buffered(m1).leb].data + subarray(buf, 0, n0)); isbuf := true⟩ (synced(avol) ∧ avol0 ↓ avol), is-aligned(# buf0 + n, EB_PAGE_SIZE)
Used simplifier rules: ⊦ mapped(buf).data = buf; (s)% ⊦ EB_PAGE_SIZE ≠ 0; (s)%m ≠ 0 ⊦ n = align↓(n0, m) → is-aligned(n, m); (ss)% ⊦ n + 0 = n; (s)%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic%c: ⊦ m + n = n + m; from specification nat-basic%m ≠ 0 ⊦ align↓(n0 + n1, m) = n0 ↔ n1 < m ∧ is-aligned(n0, m); (ws)%m ≠ 0 ⊦ is-aligned(n, m) → n % m = 0; (s)% ⊦ m < n → (n ≤ m ↔ false); (s)