[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 63 from proof refine-add-gnds (previous step)

# lpt1 = # avol, # lpt0 = # avol, isbuf2 ↔ pstate = readonly, isbuf0 ↔ pstate = readonly, lpt1[bleb.leb] = mklp(m3, m1, lpf, m2), adr = adr0, ax = ax0, ¬ isbuf0, keyset(gch) = gc-heap(lpt1, log1), log = log1, lpt = lpt0, ns = ns0, remove-refsize0(istore0) = istore0, remove-refsize0(gstore0) = gstore0, elems log1 ∩ ginval = ∅, dom gstore0 ∪ elems log1 = dom gstore ∪ ginval, ginval < # avol, abs-gstore(avol, lpt1, gstore, ginval), abs-istore(avol, lpt1, istore), awbuf-inv(avol, bleb), bin-heap-inv(gch, lpt1), buf-ro-rw-mode(pstate = readonly, bleb, lpt1, avol), bufs-log-only(bleb, log1, lpt1), flash-lpt-cons(lpt0, istore0, gstore0), freelist-cons(lpt1, freelist), inv(istore0), inv(istore), inv(gstore0), inv(gstore \ ginval), log-group-block(log1, lpt1), lpt-free-unref(lpt1), lpt-free-unref(lpt0), lpt-leb-size(lpt1), lpt-leb-size(lpt0), lpt-ram-flash(lpt1, lpt0, log1), istore0 ⊑ istore, pstate = unbuffered → isbuf1, pstate.index? → pstate.lnum ∈ istore, pstate.journal? → log1 ≠ [] ∧ pstate.lnum = log1.last ∧ pstate.lnum ∈ gstore, pstate ≠ unbuffered ∧ pstate ≠ readonly → bleb = buffered(pstate.lnum), pstate = unbuffered → bleb = nobuffer, isbuf1 → synced(avol), 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), pstate.journal? ∨ pstate = readonly ⊦ [awbuf_get_buf#(adr0, m, log1, avol, lpt0, ns0, bleb, isbuf2; ; bleb1); persistence_encode_group_nodes#(gndx0, bleb1.leb, lpt1[bleb1.leb].size; ; buf, ax, err); if err = ESUCCESS then if ¬ lpt1[bleb1.leb].size + # buf ≤ LEB_SIZE then {debug#("persistence: trying to write beyond LEB size"); awbuf_enter_readonly#(adr0, m, log1, avol, lpt0, ns0, bleb; ; isbuf2); err := ENOSPC} else {awbuf_write_buf#(# buf, buf, adr0, m, log1, lpt0, ns0, bleb; avol, isbuf2; err); if err = ESUCCESS then lpt1[bleb1.leb] := mklp(lpt1[bleb1.leb].ref-size, lpt1[bleb1.leb].size + # buf, lpt1[bleb1.leb].flags, lpt1[bleb1.leb].gcheapidx) else {debug#("persistence: adding group node to LEB " + bleb1.leb.toString + " failed"); lpt1[bleb1.leb] := mklp(lpt1[bleb1.leb].ref-size, LEB_SIZE, lpt1[bleb1.leb].flags, lpt1[bleb1.leb].gcheapidx)}} else {debug#("persistence: could not encode group node"); awbuf_enter_readonly#(adr0, m, log1, avol, lpt0, ns0, bleb; ; isbuf2)}] ( lpt-free-unref(lpt1) ∧ freelist-cons(lpt1, freelist) ∧ bin-heap-inv(gch, lpt1) ∧ keyset(gch) = gc-heap(lpt1, log1) ∧ bufs-log-only(bleb, log1, lpt1) ∧ # lpt1 = # avol ∧ log-group-block(log1, lpt1) ∧ buf-ro-rw-mode(isbuf2, bleb, lpt1, avol) ∧ lpt-leb-size(lpt1) ∧ lpt-ram-flash(lpt1, lpt0, log1) ∧ awbuf-inv(avol, bleb) ∧ # lpt0 = # avol → ⟨apersistence_add_gnds#(gndx0, adr0, istore, istore0, ginval, gstore0, log1, m, ns0; ax0, gstore, pstate, isbuf1; err0)⟩ ( abs-istore(avol, lpt1, istore) ∧ abs-gstore(avol, lpt1, gstore, ginval) ∧ ginval < # lpt1 ∧ (isbuf1 → synced(avol)) ∧ (pstate = unbuffered → bleb = nobuffer) ∧ (pstate = readonly ↔ isbuf2) ∧ (pstate ≠ unbuffered ∧ pstate ≠ readonly → bleb = buffered(pstate.lnum)) ∧ ax = ax0 ∧ err = err0)), gndx0 = [], dups(log1)

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

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).ref-size = n2; (s)% ⊦ mklp(n2, n3, lpf, m).flags = lpf; (s)%lf-02: ⊦ m < n ∧ m = n0 → n0 < n; (forward) from specification nat-basic% ⊦ mapped(buf).data = buf; (s)% ⊦ nx.last = n ∧ nx ≠ [] → n ∈ nx; (s)% ⊦ buffered(m) = buffered(m0) ↔ m = m0; (s)% ⊦ nobuffer ≠ buffered(m); (s)% ⊦ m < n → n ≠ 0; (s)% ⊦ buffered(m).leb = m; (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%lf-01: ⊦ m < n ∧ n = n0 → m < n0; (forward) from specification nat-basic%f: ⊦ m < n → n ≠ 0; (forward) from specification nat-basic%fwd-in-log-in-gstore: ⊦ n ∈ nx ∧ ginval ∩ elems nx = ∅ ∧ dom gstore0 ∪ elems nx = dom gstore ∪ ginval → n ∈ 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]%elems-in-notin-ginval: ⊦ n ∈ nx ∧ elems nx ∩ ns = ∅ → ¬ n ∈ ns; (forward) from specification apersistence-base%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]% ⊦ avol[n].mapped? ↔ (∃ buf. avol[n] = mapped(buf)); (as)% ⊦ bleb.isbuf? ↔ (∃ n. bleb = buffered(n)); (as)