[Imprint][Data Privacy Statement][E-Mail]



View long theorem info. View the proof. Back to main index. View the specification. View theorem base summary, View theorem base listing, the used properties by spec, the dependency list, the symbol table,

Proof step 25 from proof refine-add-gnds (previous step)

# lpt0 = # avol, # lpt = # avol, pstate = readonly ↔ isbuf0, lpt[bleb.leb] = mklp(m0, m1, lpf, m2), ax = ax0, keyset(gch) = gc-heap(lpt, log1), remove-refsize0(gstore0) = gstore0, remove-refsize0(istore0) = istore0, elems log1 ∩ ginval = ∅, dom gstore0 ∪ elems log1 = dom gstore ∪ ginval, ginval < # avol, abs-gstore(avol, lpt, gstore, ginval), abs-istore(avol, lpt, istore), awbuf-inv(avol, bleb), bin-heap-inv(gch, lpt), buf-ro-rw-mode(pstate = readonly, bleb, lpt, avol), bufs-log-only(bleb, log1, lpt), flash-lpt-cons(lpt0, istore0, gstore0), freelist-cons(lpt, freelist), inv(gstore \ ginval), inv(gstore0), inv(istore), inv(istore0), 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, ¬ dups(log1), pstate ≠ readonly → bleb.isbuf? ∧ bleb.leb < # avol ∧ lpf = LP_GROUP_NODES ∧ bleb.leb ∈ log1 ∧ avol[bleb.leb].mapped? ∧ (gndx0 ≠ [] ∧ m1 + gndx0.flashsize ≤ LEB_SIZE → m1 = # avol[bleb.leb].data), isbuf → synced(avol), pstate = unbuffered → bleb = nobuffer, pstate ≠ unbuffered ∧ pstate ≠ readonly → bleb = buffered(pstate.lnum), pstate.journal? → log1 ≠ [] ∧ pstate.lnum = log1.last ∧ pstate.lnum ∈ gstore, pstate.index? → pstate.lnum ∈ istore, pstate = unbuffered → isbuf, pstate.journal? ∨ pstate = readonly ⊦ [persistence_add_gnds#(gndx0, log1, LEB_SIZE, adr0, m, log1, lpt0, ns0, bleb; ax, lpt, avol, isbuf0; err)] ( lpt-free-unref(lpt) ∧ freelist-cons(lpt, freelist) ∧ bin-heap-inv(gch, lpt) ∧ keyset(gch) = gc-heap(lpt, log1) ∧ bufs-log-only(bleb, log1, lpt) ∧ # lpt = # avol ∧ log-group-block(log1, lpt) ∧ buf-ro-rw-mode(isbuf0, bleb, lpt, avol) ∧ lpt-leb-size(lpt) ∧ lpt-ram-flash(lpt, lpt0, log1) ∧ awbuf-inv(avol, bleb) ∧ # lpt0 = # avol → ⟨apersistence_add_gnds#(gndx0, adr0, istore, istore0, ginval, gstore0, log1, m, ns0; ax0, gstore, pstate, isbuf; err0)⟩ ( abs-istore(avol, lpt, istore) ∧ abs-gstore(avol, lpt, gstore, ginval) ∧ ginval < # lpt ∧ (isbuf → synced(avol)) ∧ (pstate = unbuffered → bleb = nobuffer) ∧ (pstate = readonly ↔ isbuf0) ∧ (pstate ≠ unbuffered ∧ pstate ≠ readonly → bleb = buffered(pstate.lnum)) ∧ ax = ax0 ∧ err = err0))

Heuristic nonrecursive calls applied rule call right

And obtained the following new goals

Rule argument

pos: right 1

Additional information

Used simplifier rules: persistence_add_gnds# (NODELIST, LOG, LEBSIZE, WROOTADR, WMAXINO, WLOG, WLPT, WORPHANS, WBUFLEB ; ADRLIST, LPT, WVOL, AROFS ; ERR ) {if ¬ AROFS → WBUFLEB.isbuf? ∧ WBUFLEB.leb < # LPT ∧ LPT[WBUFLEB.leb].flags = LP_GROUP_NODES ∧ WBUFLEB.leb ∈ LOG ∧ WVOL[WBUFLEB.leb].mapped? ∧ ( NODELIST ≠ [] ∧ LPT[WBUFLEB.leb].size + NODELIST.flashsize ≤ LEB_SIZE → LPT[WBUFLEB.leb].size = # WVOL[WBUFLEB.leb].data) then let AROFS0 = ? in {awbuf_is_readonly# (WROOTADR, WMAXINO, WLOG, WVOL, WLPT, WORPHANS, WBUFLEB, AROFS ; ; AROFS0); if AROFS0 then ERR := EROFS else if NODELIST = [] then {ADRLIST := []; ERR := ESUCCESS} else let BUF = ?, WBUFLEB0 = ? in {awbuf_get_buf# (WROOTADR, WMAXINO, WLOG, WVOL, WLPT, WORPHANS, WBUFLEB, AROFS ; ; WBUFLEB0); persistence_encode_group_nodes# (NODELIST, WBUFLEB0.leb, LPT[WBUFLEB0.leb].size ; ; BUF, ADRLIST, ERR); if ERR = ESUCCESS then if ¬ LPT[WBUFLEB0.leb].size + # BUF ≤ LEBSIZE then {debug# ("persistence: trying to write beyond LEB size"); awbuf_enter_readonly# (WROOTADR, WMAXINO, WLOG, WVOL, WLPT, WORPHANS, WBUFLEB ; ; AROFS); ERR := ENOSPC} else {awbuf_write_buf# (# BUF, BUF, WROOTADR, WMAXINO, WLOG, WLPT, WORPHANS, WBUFLEB ; WVOL, AROFS ; ERR); if ERR = ESUCCESS then LPT[WBUFLEB0.leb].size := LPT[WBUFLEB0.leb].size + # BUF else {debug# ( "persistence: adding group node to LEB " + WBUFLEB0.leb.toString + " failed"); LPT[WBUFLEB0.leb].size := LEBSIZE}} else {debug# ("persistence: could not encode group node"); awbuf_enter_readonly# (WROOTADR, WMAXINO, WLOG, WVOL, WLPT, WORPHANS, WBUFLEB ; ; AROFS)}}} else abort };