| # lpt4 = # avol0, # lpt2 = # avol0, # lpt = # avol, boolvar0 ↔ false, adr2 = adr1, avol = avol, avol1 = avol, keyset(gch1) = gc-heap(lpt2, log3), log = log3, lpt = replay-log(lpt4, log3), lpt = lpt, lpt3 = lpt, lpt5 = lpt4, m = m2, ns1 = ns2, nx0 = log3, remove-refsize0(gstore2) = gstore2, remove-refsize0(istore2) = istore2, elems log3 ∩ ns3 = ∅, dom gstore2 ∪ elems log3 = dom gstore1 ∪ ns3, ns3 < # avol0, abs-gstore(avol0, lpt2, gstore1, ns3), abs-istore(avol0, lpt2, istore1), awbuf-inv(avol0, bleb1), awbuf-inv(avol, nobuffer), bin-heap-inv(gch1, lpt2), buf-ro-rw-mode(pstate0 = readonly, bleb1, lpt2, avol0), bufs-log-only(bleb1, log3, lpt2), flash-lpt-cons(lpt4, istore2, gstore2), freelist-cons(lpt2, log4), inv(gstore1 \ ns3), inv(gstore2), inv(istore1), inv(istore2), log-group-block(log3, lpt2), lpt-free-unref(lpt4), lpt-free-unref(lpt2), lpt-leb-size(lpt4), lpt-leb-size(lpt2), lpt-ram-flash(lpt2, lpt4, log3), synced(avol0), synced(avol), valid-indices(lpt4, log3), avol ↓ avol0, istore2 ⊑ istore1, pstate0 = unbuffered → bleb1 = nobuffer, pstate0 ≠ unbuffered ∧ pstate0 ≠ readonly → bleb1 = buffered(pstate0.lnum), pstate0.journal? → log3 ≠ [] ∧ pstate0.lnum = log3.last ∧ pstate0.lnum ∈ gstore1, pstate0.index? → pstate0.lnum ∈ istore1, pstate0 = unbuffered → isbuf0 ⊦ [persistence_replay_lpt#(log3, LEB_SIZE, adr1, m2, log3, lpt4, ns2, nobuffer, false; lpt, avol)] ( lpt = replay-lpt(lpt3, nx0, # lpt3) ∧ awbuf-inv(avol, nobuffer) ∧ avol-replay-lpt-unchanged(avol1, avol, lpt3, nx0) → [persistence_create_freelist#(lpt; freelist); persistence_create_gcheap#(log3; lpt, gch)] ( synced(avol) ∧ freelist-cons(replay-lpt(replay-log(lpt4, log3), log3, # avol0), freelist) ∧ bin-heap-inv(gch, lpt) ∧ keyset(gch) = gc-heap(replay-lpt(replay-log(lpt4, log3), log3, # avol0), log3) ∧ # lpt = # avol ∧ log-group-block(log3, lpt) ∧ lpt-leb-size(replay-lpt(replay-log(lpt4, log3), log3, # avol0)) ∧ lpt-ram-flash(lpt, lpt4, log3) ∧ awbuf-inv(avol, nobuffer) ∧ # avol = # avol0 ∧ id-idx(replay-lpt(replay-log(lpt4, log3), log3, # avol0), lpt) → ⟨istore := remove-refsize0(crash(istore1, istore2)), gstore := crash(gstore1, gstore2, ns3, log3); ns0 := ns2; m0 := m2; log0 := log3; adr0 := adr1; apersistence_recover#(; adr4, m5, log6, ns6, adr1, log3, m2, ns2, istore, istore2, ns3, gstore, gstore2; pstate, isbuf0, err1)⟩ ( abs-istore(avol, lpt, istore) ∧ abs-gstore(avol, lpt, gstore, ns3) ∧ adr1 = adr4 ∧ m2 = m5 ∧ log3 = log6 ∧ ns3 < # lpt ∧ ns2 = ns6 ∧ flash-lpt-cons(lpt4, istore2, gstore2) ∧ pstate = unbuffered ∧ adr0 = adr4 ∧ m0 = m5 ∧ log0 = log6 ∧ ns0 = ns6 ∧ ESUCCESS = err1))), dups(log3) |
# lpt4 = # avol0, # avol = # avol0, # lpt2 = # avol0, avol1 = avol, keyset(gch1) = gc-heap(lpt2, log3), lpt = replay-log(lpt4, log3), remove-refsize0(gstore2) = gstore2, remove-refsize0(istore2) = istore2, elems log3 ∩ ns3 = ∅, dom gstore2 ∪ elems log3 = dom gstore1 ∪ ns3, ns3 < # avol0, abs-gstore(avol0, lpt2, gstore1, ns3), abs-istore(avol0, lpt2, istore1), awbuf-inv(avol0, bleb1), bin-heap-inv(gch1, lpt2), buf-ro-rw-mode(pstate0 = readonly, bleb1, lpt2, avol0), bufs-log-only(bleb1, log3, lpt2), flash-lpt-cons(lpt4, istore2, gstore2), freelist-cons(lpt2, log4), inv(gstore1 \ ns3), inv(gstore2), inv(istore1), inv(istore2), log-group-block(log3, lpt2), lpt-free-unref(lpt4), lpt-free-unref(lpt2), lpt-leb-size(lpt4), lpt-leb-size(lpt2), lpt-ram-flash(lpt2, lpt4, log3), synced(avol0), synced(avol), valid-indices(lpt4, log3), avol ↓ avol0, istore2 ⊑ istore1, ¬ dups(log3), pstate0 = unbuffered → bleb1 = nobuffer, pstate0 ≠ unbuffered ∧ pstate0 ≠ readonly → bleb1 = buffered(pstate0.lnum), pstate0.journal? → log3 ≠ [] ∧ pstate0.lnum = log3.last ∧ pstate0.lnum ∈ gstore1, pstate0.index? → pstate0.lnum ∈ istore1, pstate0 = unbuffered → isbuf0 ⊦ [persistence_replay_lpt#(log3, LEB_SIZE, adr1, m2, log3, lpt4, ns2, nobuffer, false; lpt, avol)] ( lpt = replay-lpt(replay-log(lpt4, log3), log3, # avol0) ∧ awbuf-inv(avol, nobuffer) ∧ avol-replay-lpt-unchanged(avol1, avol, replay-log(lpt4, log3), log3) → [persistence_create_freelist#(replay-lpt(replay-log(lpt4, log3), log3, # avol0); freelist); lpt := replay-lpt(replay-log(lpt4, log3), log3, # avol0); persistence_create_gcheap#(log3; lpt, gch)] ( synced(avol) ∧ freelist-cons(replay-lpt(replay-log(lpt4, log3), log3, # avol0), freelist) ∧ bin-heap-inv(gch, lpt) ∧ keyset(gch) = gc-heap(replay-lpt(replay-log(lpt4, log3), log3, # avol0), log3) ∧ # lpt = # avol ∧ log-group-block(log3, lpt) ∧ lpt-leb-size(replay-lpt(replay-log(lpt4, log3), log3, # avol0)) ∧ lpt-ram-flash(lpt, lpt4, log3) ∧ # avol = # avol0 ∧ id-idx(replay-lpt(replay-log(lpt4, log3), log3, # avol0), lpt) → ⟨istore := remove-refsize0(crash(istore1, istore2)), gstore := crash(gstore1, gstore2, ns3, log3); ns0 := ns2; m0 := m2; log0 := log3; adr0 := adr1; apersistence_recover#(; adr4, m5, log6, ns6, adr1, log3, m2, ns2, istore, istore2, ns3, gstore, gstore2; pstate, isbuf0, err1)⟩ ( abs-istore(avol, lpt, istore) ∧ abs-gstore(avol, lpt, gstore, ns3) ∧ adr1 = adr4 ∧ m2 = m5 ∧ log3 = log6 ∧ ns3 < # lpt ∧ ns2 = ns6 ∧ flash-lpt-cons(lpt4, istore2, gstore2) ∧ pstate = unbuffered ∧ adr0 = adr4 ∧ m0 = m5 ∧ log0 = log6 ∧ ns0 = ns6 ∧ ESUCCESS = err1)))
Used simplifier rules: ⊦ avol1 ↓ avol0 ∧ awbuf-inv(avol0, bleb) → awbuf-inv(avol1, nobuffer); (s)% ⊦ # replay-log(lpt, nx) = # lpt; (s)