| # lpt1 = # avol0, # lpt0 = # avol0, lpt1[n0] = mklp(0, m1, LP_FREE, m2), keyset(gch) = gc-heap(lpt1, log1), remove-refsize0(gstore1) = gstore1, remove-refsize0(istore0) = istore0, elems log1 ∩ ginval = ∅, dom gstore1 ∪ elems log1 = dom gstore2 ∪ ginval, ginval < # avol0, n0 < # avol0, abs-gstore(avol0, lpt1, gstore2, ginval), abs-istore(avol0, lpt1, istore), awbuf-inv(avol0, bleb), bin-heap-inv(gch, lpt1), buf-ro-rw-mode(false, bleb, lpt1, avol0), bufs-log-only(bleb, log1, lpt1), flash-lpt-cons(lpt0, istore0, gstore1), freelist-cons(lpt1, n0 ' + nx0), inv(gstore2 \ ginval), inv(gstore1), inv(istore), inv(istore0), 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, lpt0, log1), synced(avol0), istore0 ⊑ istore, ⌊err1⌋ , pstate = unbuffered → bleb = nobuffer, pstate.journal? → log1 ≠ [] ∧ pstate.lnum = log1.last ∧ pstate.lnum ∈ gstore2, pstate.index? → pstate.lnum ∈ istore, pstate ≠ unbuffered → bleb = buffered(pstate.lnum) ⊦ (⌊err1⌋ ∨ err1 = ESUCCESS) ∧ ⟨err := err1; pstate0 := pstate; if err = ESUCCESS then choose n with ¬ n ∈ istore in istore[n] := indexblock([], [], 0), pstate := index(n)⟩ ( abs-istore(avol0, lpt1, istore) ∧ (pstate = unbuffered → bleb = nobuffer) ∧ (pstate = readonly ↔ pstate0 = readonly) ∧ (pstate ≠ unbuffered ∧ pstate ≠ readonly → bleb = buffered(pstate.lnum)) ∧ err1 = err), pstate = readonly, dups(log1) |
# lpt0 = # avol0, # lpt1 = # avol0, lpt1[n0] = mklp(0, m1, LP_FREE, m2), keyset(gch) = gc-heap(lpt1, log1), remove-refsize0(istore0) = istore0, remove-refsize0(gstore1) = gstore1, elems log1 ∩ ginval = ∅, dom gstore1 ∪ elems log1 = dom gstore2 ∪ ginval, pstate ≠ readonly, n0 < # avol0, ginval < # avol0, abs-gstore(avol0, lpt1, gstore2, ginval), abs-istore(avol0, lpt1, istore), awbuf-inv(avol0, bleb), bin-heap-inv(gch, lpt1), buf-ro-rw-mode(false, bleb, lpt1, avol0), bufs-log-only(bleb, log1, lpt1), flash-lpt-cons(lpt0, istore0, gstore1), freelist-cons(lpt1, n0 ' + nx0), inv(istore0), inv(istore), inv(gstore1), inv(gstore2 \ ginval), log-group-block(log1, lpt1), lpt-free-unref(lpt0), lpt-free-unref(lpt1), lpt-leb-size(lpt0), lpt-leb-size(lpt1), lpt-ram-flash(lpt1, lpt0, log1), synced(avol0), istore0 ⊑ istore, ⌊err1⌋ , ¬ dups(log1), pstate ≠ unbuffered → bleb = buffered(pstate.lnum), pstate.index? → pstate.lnum ∈ istore, pstate.journal? → log1 ≠ [] ∧ pstate.lnum = log1.last ∧ pstate.lnum ∈ gstore2, pstate = unbuffered → bleb = nobuffer ⊦ ⟨err := err1; pstate0 := pstate; if err = ESUCCESS then choose n with ¬ n ∈ istore in istore[n] := indexblock([], [], 0), pstate := index(n)⟩ ( abs-istore(avol0, lpt1, istore) ∧ (pstate = unbuffered → bleb = nobuffer) ∧ (pstate = readonly ↔ pstate0 = readonly) ∧ (pstate ≠ unbuffered ∧ pstate ≠ readonly → bleb = buffered(pstate.lnum)) ∧ err1 = err)