| # lpt0 = # avol, # lpt1 = # avol, lpt1[n0] = mklp(0, m1, LP_FREE, m2), keyset(gch) = gc-heap(lpt1, log1), pstate0 = pstate, remove-refsize0(istore0) = istore0, remove-refsize0(gstore0) = gstore0, elems log1 ∩ ginval = ∅, dom gstore0 ∪ elems log1 = dom gstore ∪ ginval, n0 < # avol, ginval < # avol, abs-gstore(avol, lpt1, gstore, ginval), abs-istore(avol, lpt1, istore), awbuf-inv(avol, bleb), bin-heap-inv(gch, lpt1), buf-ro-rw-mode(false, bleb, lpt1, avol), bufs-log-only(bleb, log1, lpt1), flash-lpt-cons(lpt0, istore0, gstore0), freelist-cons(lpt1, n0 ' + nx0), inv(istore0), inv(istore), inv(gstore0), inv(gstore \ 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(avol), istore0 ⊑ istore, ⌊err0⌋ , pstate ≠ unbuffered → bleb = buffered(pstate.lnum), pstate.index? → pstate.lnum ∈ istore, pstate.journal? → log1 ≠ [] ∧ pstate.lnum = log1.last ∧ pstate.lnum ∈ gstore, pstate = unbuffered → bleb = nobuffer ⊦ ⟨apersistence_allocate_ind#(adr0, istore0, ginval, gstore, gstore0, log1, m, ns0, true; istore, pstate; err1)⟩ ( abs-istore(avol, lpt1, istore) ∧ (pstate = unbuffered → bleb = nobuffer) ∧ (pstate = readonly ↔ pstate0 = readonly) ∧ (pstate ≠ unbuffered ∧ pstate ≠ readonly → bleb = buffered(pstate.lnum)) ∧ err0 = err1), pstate = readonly, dups(log1) |
# lpt1 = # avol, # lpt0 = # avol, isbuf ↔ true, lpt1[n0] = mklp(0, m1, LP_FREE, m2), adr = adr0, gstore = gstore1, gstore0 = gstore2, keyset(gch) = gc-heap(lpt1, log1), log = log1, maxino = m, ns = ns0, pstate0 = pstate, remove-refsize0(gstore1) = gstore1, remove-refsize0(istore0) = istore0, elems log1 ∩ ginval = ∅, dom gstore1 ∪ elems log1 = dom gstore2 ∪ ginval, ginval < # avol, n0 < # avol, abs-gstore(avol, lpt1, gstore2, ginval), abs-istore(avol, lpt1, istore), awbuf-inv(avol, bleb), bin-heap-inv(gch, lpt1), buf-ro-rw-mode(false, bleb, lpt1, avol), 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(avol), istore0 ⊑ istore, ⌊err0⌋ , 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) ⊦ ⟨if isbuf then {fail_or_success#(; ; err); if err = ESUCCESS then choose n with ¬ n ∈ istore in istore[n] := indexblock([], [], 0), pstate := index(n)} else abort⟩ ( abs-istore(avol, lpt1, istore) ∧ (pstate = unbuffered → bleb = nobuffer) ∧ (pstate = readonly ↔ pstate0 = readonly) ∧ (pstate ≠ unbuffered ∧ pstate ≠ readonly → bleb = buffered(pstate.lnum)) ∧ err0 = err), pstate = readonly, dups(log1)
Used simplifier rules: apersistence_allocate_ind# (ROOTADR, ISTORE0, GINVAL, GSTORE, GSTORE0, NL, MAXINO, OS, PSYNCED ; ISTORE, PSTATE ; ERR ) {if PSYNCED then {fail_or_success#(; ; ERR); if ERR = ESUCCESS then choose N with ¬ N ∈ ISTORE in ISTORE[N] := indexblock([], [], 0), PSTATE := index(N)} else abort };