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