| # lpt2 = # avol, # lpt1 = # avol, LEB_SIZE = n1 + m1, lpt2[n] = mklp(m0, m1, lpf, m2), keyset(gch) = gc-heap(lpt2, log1), remove-refsize0(gstore0) = gstore0, remove-refsize0(istore0) = istore0, elems log1 ∩ ginval = ∅, dom gstore0 ∪ elems log1 = dom gstore ∪ ginval, pstate ≠ unbuffered, ginval < # avol, n < # avol, abs-gstore(avol, lpt2, gstore, ginval), abs-istore(avol, lpt2, istore), awbuf-inv(avol, buffered(n)), bin-heap-inv(gch, lpt2), buf-ro-rw-mode(pstate = readonly, buffered(n), lpt2, avol), bufs-log-only(buffered(n), log1, lpt2), flash-lpt-cons(lpt1, istore0, gstore0), freelist-cons(lpt2, freelist), inv(gstore \ ginval), inv(gstore0), inv(istore), inv(istore0), log-group-block(log1, lpt2), lpt-free-unref(lpt2), lpt-free-unref(lpt1), lpt-leb-size(lpt2), lpt-leb-size(lpt1), lpt-ram-flash(lpt2, lpt1, log1), m1 ≤ LEB_SIZE, istore0 ⊑ istore, ¬ dups(log1), pstate ≠ readonly → n = pstate.lnum, pstate.journal? → log1 ≠ [] ∧ pstate.lnum = log1.last ∧ pstate.lnum ∈ gstore, pstate.index? → pstate.lnum ∈ istore, isbuf0 → synced(avol) ⊦ ⟨apersistence_get_block_free_size#(adr0, istore, istore0, ginval, gstore, gstore0, log1, m, ns0, pstate, isbuf0; ; n0)⟩ ((isbuf0 → synced(avol)) ∧ (pstate ≠ readonly → n = pstate.lnum) ∧ n1 = n0) |
# lpt1 = # avol, # lpt2 = # avol, isbuf ↔ isbuf0, LEB_SIZE = n1 + m1, lpt2[n] = mklp(m0, m1, lpf, m2), adr = adr0, gstore = gstore1, gstore0 = gstore2, istore = istore1, istore0 = istore2, keyset(gch) = gc-heap(lpt2, log1), log = log1, maxino = m, ns = ns0, remove-refsize0(istore1) = istore1, remove-refsize0(gstore1) = gstore1, elems log1 ∩ ginval = ∅, dom gstore1 ∪ elems log1 = dom gstore2 ∪ ginval, n < # avol, ginval < # avol, abs-gstore(avol, lpt2, gstore2, ginval), abs-istore(avol, lpt2, istore2), awbuf-inv(avol, buffered(n)), bin-heap-inv(gch, lpt2), buf-ro-rw-mode(pstate = readonly, buffered(n), lpt2, avol), bufs-log-only(buffered(n), log1, lpt2), flash-lpt-cons(lpt1, istore1, gstore1), freelist-cons(lpt2, freelist), inv(istore1), inv(istore2), inv(gstore1), inv(gstore2 \ ginval), log-group-block(log1, lpt2), lpt-free-unref(lpt1), lpt-free-unref(lpt2), lpt-leb-size(lpt1), lpt-leb-size(lpt2), lpt-ram-flash(lpt2, lpt1, log1), m1 ≤ LEB_SIZE, istore1 ⊑ istore2, isbuf0 → synced(avol), pstate.index? → pstate.lnum ∈ istore2, pstate.journal? → log1 ≠ [] ∧ pstate.lnum = log1.last ∧ pstate.lnum ∈ gstore2, pstate ≠ readonly → n = pstate.lnum ⊦ ⟨if pstate = unbuffered then n0 := 0 else choose n with n ≤ LEB_SIZE in n0 := n⟩ ((isbuf0 → synced(avol)) ∧ (pstate ≠ readonly → n = pstate.lnum) ∧ n1 = n0), pstate = unbuffered, dups(log1)
Used simplifier rules: apersistence_get_block_free_size# (ROOTADR, ISTORE, ISTORE0, GINVAL, GSTORE, GSTORE0, NL, MAXINO, OS, PSTATE, PSYNCED ; ; N ) {if PSTATE = unbuffered then N := 0 else choose N0 with N0 ≤ LEB_SIZE in N := N0 };