| # gndx0 = # lax0, # buf0 = gndx0.flashsize, # lpt0 = # avol, # lpt1 = # avol, (elems nx ∪ dom gstore0) ++ n = dom gstore ∪ ginval, gstore[n] = groupblock(gndx1, lax1, m1), avol[n] = mapped(buf1), lpt1[n] = mklp(m1, # buf1, LP_GROUP_NODES, m2), keyset(gch) = gc-heap(lpt1, nx + n '), pstate = journal(n), remove-refsize0(gstore0) = gstore0, remove-refsize0(istore1) = istore1, ginval ∩ elems nx = ∅, ginval < # avol, n < # avol, abs-gstore(avol, lpt1, gstore, ginval), abs-istore(avol, lpt1, istore2), abs-nodes(buf0, # buf1, gndx0, lax0, false), awbuf-inv(avol[n, mapped(buf1 + buf0)], buffered(n)), awbuf-inv(avol, buffered(n)), bin-heap-inv(gch, lpt1), buf-ro-rw-mode(false, buffered(n), lpt1, avol), bufs-log-only(buffered(n), nx + n ', lpt1), flash-lpt-cons(lpt0, istore1, gstore0), freelist-cons(lpt1, freelist), inv(groupblock(gndx1, lax1, m1)), inv(gstore \ ginval), inv(gstore0), inv(istore2), inv(istore1), log-group-block(nx + n ', lpt1), lpt-free-unref(lpt0), lpt-free-unref(lpt1), lpt-leb-size(lpt0), lpt-leb-size(lpt1), lpt-ram-flash(lpt1, lpt0, nx + n '), n ∈ gstore, # buf1 + gndx0.flashsize ≤ LEB_SIZE, istore1 ⊑ istore2, isbuf1 → synced(avol) ⊦ (⌊ESUCCESS⌋ ∨ ESUCCESS = ESUCCESS) ∧ ¬ dups(lax1 + lax0) ∧ # lax0 ≤ # lax0 ∧ inv-flashsize(prefixn(# lax0, gndx0), lax0) ∧ (ESUCCESS = ESUCCESS ↔ # lax0 = # lax0) ∧ ⟨ax := lax0.to-adr(pstate.lnum), err0 := ESUCCESS; gstore[pstate.lnum].gndlist := gstore[pstate.lnum].gndlist + prefixn(# lax0, gndx0); gstore[pstate.lnum].ladrlist := gstore[pstate.lnum].ladrlist + lax0; if err0 ≠ ESUCCESS then ax := ?, pstate := readonly; isbuf1 := ?⟩ ( abs-gstore (avol[pstate.lnum, mapped(avol[pstate.lnum].data + buf0)], lpt1 [pstate.lnum, mklp(lpt1[pstate.lnum].ref-size, lpt1[pstate.lnum].size + gndx0.flashsize, lpt1[pstate.lnum].flags, lpt1[pstate.lnum].gcheapidx) ], gstore, ginval) ∧ (isbuf1 → is-aligned(# avol[pstate.lnum].data + # buf0, EB_PAGE_SIZE)) ∧ pstate ≠ unbuffered ∧ pstate ≠ readonly ∧ n = pstate.lnum ∧ lax0.to-adr(pstate.lnum) = ax ∧ ESUCCESS = err0), gndx0 = [], dups(nx), n ∈ ginval, n ∈ nx |
# lpt1 = # avol, # lpt0 = # avol, # buf0 = gndx0.flashsize, # gndx0 = # lax0, (elems nx ∪ dom gstore0) ++ n = dom gstore ∪ ginval, lpt1[n] = mklp(m1, # buf1, LP_GROUP_NODES, m2), avol[n] = mapped(buf1), gstore[n] = groupblock(gndx1, lax1, m1), keyset(gch) = gc-heap(lpt1, nx + n '), pstate = journal(n), remove-refsize0(istore1) = istore1, remove-refsize0(gstore0) = gstore0, ginval ∩ elems nx = ∅, gndx0 ≠ [], n < # avol, ginval < # avol, abs-gstore(avol, lpt1, gstore, ginval), abs-istore(avol, lpt1, istore2), abs-nodes(buf0, # buf1, gndx0, lax0, false), awbuf-inv(avol, buffered(n)), awbuf-inv(avol[n, mapped(buf1 + buf0)], buffered(n)), bin-heap-inv(gch, lpt1), buf-ro-rw-mode(false, buffered(n), lpt1, avol), bufs-log-only(buffered(n), nx + n ', lpt1), flash-lpt-cons(lpt0, istore1, gstore0), freelist-cons(lpt1, freelist), inv(istore1), inv(istore2), inv(gstore0), inv(gstore \ ginval), inv(groupblock(gndx1, lax1, m1)), log-group-block(nx + n ', lpt1), lpt-free-unref(lpt1), lpt-free-unref(lpt0), lpt-leb-size(lpt1), lpt-leb-size(lpt0), lpt-ram-flash(lpt1, lpt0, nx + n '), n ∈ gstore, # buf1 + gndx0.flashsize ≤ LEB_SIZE, istore1 ⊑ istore2, ¬ dups(nx), ¬ n ∈ nx, ¬ n ∈ ginval, isbuf1 → synced(avol) ⊦ ¬ dups(lax1 + lax0) ∧ ⟨ax := lax0.to-adr(pstate.lnum), err0 := ESUCCESS; gstore[pstate.lnum].gndlist := gstore[pstate.lnum].gndlist + prefixn(# lax0, gndx0); gstore[pstate.lnum].ladrlist := gstore[pstate.lnum].ladrlist + lax0; if err0 ≠ ESUCCESS then ax := ?, pstate := readonly; isbuf1 := ?⟩ ( abs-gstore (avol[pstate.lnum, mapped(avol[pstate.lnum].data + buf0)], lpt1 [pstate.lnum, mklp(lpt1[pstate.lnum].ref-size, lpt1[pstate.lnum].size + gndx0.flashsize, lpt1[pstate.lnum].flags, lpt1[pstate.lnum].gcheapidx) ], gstore, ginval) ∧ (isbuf1 → is-aligned(# avol[pstate.lnum].data + # buf0, EB_PAGE_SIZE)) ∧ pstate ≠ unbuffered ∧ pstate ≠ readonly ∧ n = pstate.lnum ∧ lax0.to-adr(pstate.lnum) = ax ∧ ESUCCESS = err0)
Used simplifier rules: ⊦ abs-nodes(buf, m, gndx, lax, weak) → inv-flashsize(gndx, lax); (s)%# gndx ≤ m ⊦ prefixn(m, gndx) = gndx; (s)% ⊦ ¬ natkey < natkey; (s)% ⊦ m ≤ n ↔ ¬ n < m; (ss)% ⊦ m ≤ m; (s)% ⊦ ¬ ⌊ESUCCESS⌋ ; (s)