| # lpt0 = # avol, # lpt = # avol, lpt[pstate.lnum] = mklp(m, m0, LP_GROUP_NODES, m1), keyset(gch) = gc-heap(lpt, log1), pstate = journal(m2), remove-refsize0(istore0) = istore0, remove-refsize0(gstore0) = gstore0, elems log1 ∩ ginval = ∅, dom gstore0 ∪ elems log1 = dom gstore ∪ ginval, ginval < # avol, pstate.lnum < # avol, abs-gstore(avol, lpt, gstore, ginval), abs-istore(avol, lpt, istore), awbuf-inv(avol, buffered(pstate.lnum)), bin-heap-inv(gch, lpt), buf-ro-rw-mode(false, buffered(pstate.lnum), lpt, avol), bufs-log-only(buffered(pstate.lnum), log1, lpt), flash-lpt-cons(lpt0, istore0, gstore0), freelist-cons(lpt, freelist), inv(istore0), inv(istore), inv(gstore0), inv(gstore \ ginval), log-group-block(log1, lpt), lpt-free-unref(lpt0), lpt-free-unref(lpt), lpt-leb-size(lpt0), lpt-leb-size(lpt), lpt-ram-flash(lpt, lpt0, log1), istore0 ⊑ istore, pstate.index? → pstate.lnum ∈ istore, pstate.journal? → log1 ≠ [] ∧ pstate.lnum = log1.last ∧ pstate.lnum ∈ gstore, isbuf → synced(avol) ⊦ pstate = readonly, pstate = unbuffered, dups(log1), # avol[pstate.lnum].data ≤ LEB_SIZE ∧ avol[pstate.lnum].mapped? ∧ m0 = # avol[pstate.lnum].data ∧ is-aligned(# avol[pstate.lnum].data, 2 * NODE_HEADER_SIZE) |
# lpt0 = # avol, # lpt = # avol, lpt[log1.last] = mklp(gstore[log1.last].ref-size, m0, LP_GROUP_NODES, m1), keyset(gch) = gc-heap(lpt, log1), remove-refsize0(istore0) = istore0, remove-refsize0(gstore0) = gstore0, elems log1 ∩ ginval = ∅, dom gstore0 ∪ elems log1 = dom gstore ∪ ginval, ginval < # avol, log1.last < # avol, abs-gstore(avol, lpt, gstore, ginval), abs-istore(avol, lpt, istore), awbuf-inv(avol, buffered(log1.last)), bin-heap-inv(gch, lpt), buf-ro-rw-mode(false, buffered(log1.last), lpt, avol), bufs-log-only(buffered(log1.last), log1, lpt), flash-lpt-cons(lpt0, istore0, gstore0), freelist-cons(lpt, freelist), inv(gstore[log1.last]), inv(istore0), inv(istore), inv(gstore0), inv(gstore \ ginval), log-group-block(log1, lpt), lpt-free-unref(lpt0), lpt-free-unref(lpt), lpt-leb-size(lpt0), lpt-leb-size(lpt), lpt-ram-flash(lpt, lpt0, log1), log1.last ∈ gstore, istore0 ⊑ istore, isbuf → synced(avol) ⊦ log1 = [], dups(log1), # avol[log1.last].data ≤ LEB_SIZE ∧ avol[log1.last].mapped? ∧ m0 = # avol[log1.last].data ∧ is-aligned(# avol[log1.last].data, 2 * NODE_HEADER_SIZE)
Used simplifier rules: fwd-in-gstore-lpt: ⊦ n ∈ gstore ∧ abs-gstore(avol, lpt, gstore, ginval) → n < # lpt ∧ lpt[n].ref-size = gstore[n].ref-size ∧ lpt[n].flags = LP_GROUP_NODES;% ⊦ mklp(n2, n3, lpf, m).flags = lpf; (s)% ⊦ mklp(n2, n3, lpf, m).ref-size = n2; (s)%fwd-inv-loghead: ⊦ nx ≠ [] ∧ inv(gstore \ ginval) ∧ ginval ∩ elems nx = ∅ ∧ dom gstore0 ∪ elems nx = dom gstore ∪ ginval → inv(gstore[nx.last]); (forward) from specification apersistence-base%fwd-in-gstore-loghead: ⊦ nx ≠ [] ∧ ginval ∩ elems nx = ∅ ∧ dom gstore0 ∪ elems nx = dom gstore ∪ ginval → nx.last ∈ gstore; (forward) from specification apersistence-base%unc: ⊦ ns ∪ ns0 = ns0 ∪ ns; from specification set-union[nat-set]%una: ⊦ (ns ∪ ns0) ∪ ns1 = ns ∪ ns0 ∪ ns1; from specification set-union[nat-set]%int-c: ⊦ ns ∩ ns0 = ns0 ∩ ns; from specification set-union[nat-set]%int-a: ⊦ (ns ∩ ns0) ∩ ns1 = ns ∩ ns0 ∩ ns1; from specification set-union[nat-set]%inv-buf-in-vol: ⊦ awbuf-inv(avol, buffered(n)) → n < # avol; (forward) from specification awbuf-inv%lf-01: ⊦ m < n ∧ n = n0 → m < n0; (forward) from specification nat-basic%lf-02: ⊦ m < n ∧ m = n0 → n0 < n; (forward) from specification nat-basic% ⊦ ¬ journal(m).index?; (s)% ⊦ journal(m).journal?; (s)% ⊦ readonly ≠ journal(m); (s)% ⊦ unbuffered ≠ journal(m); (s)% ⊦ journal(m).lnum = m; (s)