| # lpt1 = # avol0, # lpt0 = # avol0, EB_PAGE_SIZE = # buf1 + # buf % EB_PAGE_SIZE, lpt1[pstate.lnum] = mklp(m, # buf, lpf, m4), avol0[pstate.lnum] = mapped(buf), gc-heap(lpt1, log1) = gc-heap(lpt1[pstate.lnum, mklp(m, LEB_SIZE, lpf, m4)], log1), keyset(gch) = gc-heap(lpt1, log1), remove-refsize0(istore1) = istore1, remove-refsize0(gstore1) = gstore1, elems log1 ∩ ginval = ∅, dom gstore1 ∪ elems log1 = dom gstore2 ∪ ginval, pstate.lnum < # avol0, ginval < # avol0, n < # buf1, abs-gstore(avol0, lpt1, gstore2, ginval), abs-istore(avol0, lpt1, istore2), abs-padding(buf1), awbuf-inv(avol0, buffered(pstate.lnum)), awbuf-inv(avol0[pstate.lnum, mapped(buf + subarray(buf1, 0, n))], buffered(pstate.lnum)), bin-heap-inv(gch, lpt1), buf-ro-rw-mode(false, buffered(pstate.lnum), lpt1, avol0), bufs-log-only(buffered(pstate.lnum), log1, lpt1), flash-lpt-cons(lpt0, istore1, gstore1), freelist-cons(lpt1, freelist), inv(istore1), inv(istore2), inv(gstore1), inv(gstore2 \ ginval), is-aligned(# buf + n, EB_PAGE_SIZE), is-aligned(# buf, 2 * NODE_HEADER_SIZE), log-group-block(log1, lpt1[pstate.lnum, mklp(m, LEB_SIZE, lpf, m4)]), log-group-block(log1, lpt1), lpt-free-unref(lpt1), lpt-free-unref(lpt0), lpt-leb-size(lpt1), lpt-leb-size(lpt0), lpt-ram-flash(lpt1[pstate.lnum, mklp(m, LEB_SIZE, lpf, m4)], lpt0, log1), lpt-ram-flash(lpt1, lpt0, log1), # buf + # buf1 ≤ LEB_SIZE, # buf ≤ LEB_SIZE, istore1 ⊑ istore2, ⌊err1⌋ , pstate.index? → pstate.lnum ∈ istore2, pstate.journal? → log1 ≠ [] ∧ pstate.lnum = log1.last ∧ pstate.lnum ∈ gstore2, pstate.index? ∨ pstate.journal? ⊦ ⟨pstate0 := pstate; skip or pstate := readonly⟩ ( abs-istore (avol0[pstate0.lnum, mapped(avol0[pstate0.lnum].data + subarray(buf1, 0, n))], lpt1[pstate0.lnum, mklp(m, LEB_SIZE, lpf, m4)], istore2) ∧ abs-gstore (avol0[pstate0.lnum, mapped(avol0[pstate0.lnum].data + subarray(buf1, 0, n))], lpt1[pstate0.lnum, mklp(m, LEB_SIZE, lpf, m4)], gstore2, ginval) ∧ (err1 = ESUCCESS → synced(avol0[pstate0.lnum, mapped(avol0[pstate0.lnum].data + subarray(buf1, 0, n))])) ∧ pstate = readonly ∧ err1 = err1), buf1 = mkbuf(0), lpf = LP_FREE, n = 0, pstate = readonly, pstate = unbuffered, dups(log1), is-aligned(# buf, EB_PAGE_SIZE) |
# lpt0 = # avol0, # lpt1 = # avol0, EB_PAGE_SIZE = # buf1 + # buf % EB_PAGE_SIZE, avol0[pstate.lnum] = mapped(buf), lpt1[pstate.lnum] = mklp(m, # buf, lpf, m4), gc-heap(lpt1, log1) = gc-heap(lpt1[pstate.lnum, mklp(m, LEB_SIZE, lpf, m4)], log1), keyset(gch) = gc-heap(lpt1, log1), pstate0 = pstate, remove-refsize0(gstore1) = gstore1, remove-refsize0(istore1) = istore1, elems log1 ∩ ginval = ∅, dom gstore1 ∪ elems log1 = dom gstore2 ∪ ginval, n < # buf1, ginval < # avol0, pstate.lnum < # avol0, abs-gstore(avol0, lpt1, gstore2, ginval), abs-istore(avol0, lpt1, istore2), abs-padding(buf1), awbuf-inv(avol0[pstate.lnum, mapped(buf + subarray(buf1, 0, n))], buffered(pstate.lnum)), awbuf-inv(avol0, buffered(pstate.lnum)), bin-heap-inv(gch, lpt1), buf-ro-rw-mode(false, buffered(pstate.lnum), lpt1, avol0), bufs-log-only(buffered(pstate.lnum), log1, lpt1), flash-lpt-cons(lpt0, istore1, gstore1), freelist-cons(lpt1, freelist), inv(gstore2 \ ginval), inv(gstore1), inv(istore2), inv(istore1), is-aligned(# buf, 2 * NODE_HEADER_SIZE), is-aligned(# buf + n, EB_PAGE_SIZE), log-group-block(log1, lpt1), log-group-block(log1, lpt1[pstate.lnum, mklp(m, LEB_SIZE, lpf, m4)]), lpt-free-unref(lpt0), lpt-free-unref(lpt1), lpt-leb-size(lpt0), lpt-leb-size(lpt1), lpt-ram-flash(lpt1, lpt0, log1), lpt-ram-flash(lpt1[pstate.lnum, mklp(m, LEB_SIZE, lpf, m4)], lpt0, log1), # buf ≤ LEB_SIZE, # buf + # buf1 ≤ LEB_SIZE, istore1 ⊑ istore2, ⌊err1⌋ , pstate.journal? → log1 ≠ [] ∧ pstate.lnum = log1.last ∧ pstate.lnum ∈ gstore2, pstate.index? → pstate.lnum ∈ istore2, pstate.index? ∨ pstate.journal? ⊦ ⟨skip or pstate := readonly⟩ ( abs-istore (avol0[pstate0.lnum, mapped(avol0[pstate0.lnum].data + subarray(buf1, 0, n))], lpt1[pstate0.lnum, mklp(m, LEB_SIZE, lpf, m4)], istore2) ∧ abs-gstore (avol0[pstate0.lnum, mapped(avol0[pstate0.lnum].data + subarray(buf1, 0, n))], lpt1[pstate0.lnum, mklp(m, LEB_SIZE, lpf, m4)], gstore2, ginval) ∧ (err1 = ESUCCESS → synced(avol0[pstate0.lnum, mapped(avol0[pstate0.lnum].data + subarray(buf1, 0, n))])) ∧ pstate = readonly ∧ err1 = err1), buf1 = mkbuf(0), lpf = LP_FREE, n = 0, pstate = unbuffered, pstate = readonly, dups(log1), is-aligned(# buf, EB_PAGE_SIZE)