| # buf1 = EB_PAGE_SIZE, # lpt = # avol, avol[m4] = mapped(buf2), bleb = buffered(m4), buf = mkbuf(n1), buf0 = buf3, m = m3, m0 = EB_PAGE_SIZE, n = (wbuf.nbytes + n2) % m0, n0 = n1 - wbuf.nbytes, n1 = align↓(wbuf.nbytes + n2, m0), n2 = n3, ¬ rofs, wbuf = mkwbuf(buf1, m1, m2), m4 < # avol, ebm-vol-inv(avol), wbuf-cons(mkwbuf(buf1, m1, m2), mapped(buf2), rofs), 0 + n0 ≤ # buf0, wbuf.nbytes + n0 ≤ # copy(wbuf.content, 0, buf, 0, wbuf.nbytes), 0 + wbuf.nbytes ≤ # buf, 0 + wbuf.nbytes ≤ # wbuf.content, n1 ≥ wbuf.nbytes, wbuf.nbytes + n2 ≥ m0, ¬ rofs → m1 + m2 + n3 ≤ LEB_SIZE ∧ n3 ≤ # buf3 ⊦ ⟪apersistence_io_write# (bleb.leb, wbuf.offset, 0, n1, copy(buf0, 0, copy(wbuf.content, 0, buf, 0, wbuf.nbytes), wbuf.nbytes, n0), adr, m, plog, lpt, ns; avol; err); if err = ESUCCESS then {wbuf.content := copy(buf0, n0, wbuf.content, 0, n); wbuf.offset := wbuf.offset + n1; wbuf.nbytes := n} else rofs := true⟫ (# wbuf.content = EB_PAGE_SIZE ∧ m4 < # avol ∧ wbuf-cons(wbuf, avol[m4], rofs) ∧ ebm-vol-inv(avol) ∧ # lpt = # avol), m0 = 0 |
# buf1 = EB_PAGE_SIZE, # lpt = # avol, avol[m4] = mapped(buf2), m4 < # avol, ebm-vol-inv(avol), wbuf-cons(mkwbuf(buf1, m1, m2), mapped(buf2), false), n3 ≤ # buf3, m1 + m2 + n3 ≤ LEB_SIZE, align↓(m2 + n3, EB_PAGE_SIZE) ≤ # buf3 + m2, m2 ≤ EB_PAGE_SIZE, m2 ≤ align↓(m2 + n3, EB_PAGE_SIZE), EB_PAGE_SIZE ≤ m2 + n3 ⊦ ⟪apersistence_io_write# (buffered(m4).leb, m1, 0, align↓(m2 + n3, EB_PAGE_SIZE), copy(buf3, 0, copy(buf1, 0, mkbuf(align↓(m2 + n3, EB_PAGE_SIZE)), 0, m2), m2, align↓(m2 + n3, EB_PAGE_SIZE) - m2), adr, m, plog, lpt, ns ; avol ; err); wbuf := mkwbuf(buf1, m1, m2); rofs := false; if err = ESUCCESS then {wbuf.content := copy(buf3, align↓(m2 + n3, EB_PAGE_SIZE) - m2, wbuf.content, 0, (m2 + n3) % EB_PAGE_SIZE); wbuf.offset := wbuf.offset + align↓(m2 + n3, EB_PAGE_SIZE); wbuf.nbytes := (m2 + n3) % EB_PAGE_SIZE} else rofs := true⟫ (# wbuf.content = EB_PAGE_SIZE ∧ m4 < # avol ∧ wbuf-cons(wbuf, avol[m4], rofs) ∧ ebm-vol-inv(avol) ∧ # lpt = # avol)
Used simplifier rules: ⊦ mapped(buf).mapped?; (s)% ⊦ m ≤ m + n; (s)%wbuf-cons-mapped: ⊦ wbuf-cons(wbuf, aleb, boolvar) → aleb.mapped?; (forward) from specification wbuf-base%lf-01: ⊦ m < n ∧ n = n0 → m < n0; (forward) from specification nat-basic%let: ⊦ n ≤ n0 ∧ n0 ≤ n1 → n ≤ n1; (forward) from specification nat% ⊦ mkwbuf(buf, m, m0).offset = m; (s)%n0 ≤ n ⊦ n - n0 ≤ m ↔ n ≤ m + n0; (s)% ⊦ m ≤ m; (s)% ⊦ m + n ≤ m + n0 ↔ n ≤ n0; (s)%n ≤ m ⊦ (m - n) + m0 ≤ n0 ↔ m + m0 ≤ n0 + n; (s)% ⊦ m ≤ n → (n < m ↔ false); (s)% ⊦ m ≤ n ↔ ¬ n < m; (ss)% ⊦ # copy(buf, m, buf0, m0, n) = # buf0; (s)% ⊦ # mkbuf(n) = n; (s)% ⊦ mkwbuf(buf, m, m0).content = buf; (s)%c: ⊦ m + n = n + m; from specification nat-basic%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic% ⊦ n + 0 = n; (s)% ⊦ n ≥ m ↔ m ≤ n; (s)% ⊦ mkwbuf(buf, m, m0).nbytes = m0; (s)% ⊦ EB_PAGE_SIZE ≠ 0; (s)