[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 60 from proof inv-io-save (previous step)

zh[r] = mkznode(r0, zbrar, boolvar, true, m0), adr = adr1, istore = istore3[n, indexblock([], [], 0)], pstate = index(n), remove-refsize0(gstore1) = gstore1, remove-refsize0(istore2) = istore2, syn, elems nx ∩ ginval2 = ∅, dom gstore1 ∪ elems nx = dom gstore2 ∪ ginval2, ((btree(rp, r, adr1, height, dirty, ri, nodes(istore3), as, alladrs, ok) * P))(zh), n0 < save(mkznode(r0, zbrar, boolvar, true, m0)).flashsize, btree-sub-clean(r, m0, zh), inv(gstore2 \ ginval2), inv(gstore1), inv(istore3), inv(istore2), inv(istore3[n, indexblock([], [], 0)]), refsize-cons(istore3, as0 ∪ as), r ∈ zh, m ∈ istore3, n0 ≤ LEB_SIZE, as0 ⊆ dom nodes(istore3), alladrs ⊆ dom nodes(istore3), as ⊆ alladrs, as ⊆ dom nodes(istore3), istore2 ⊑ istore3, istore2 ⊑ istore3[n, indexblock([], [], 0)], ¬ dups(nx), ¬ n ∈ istore3, ¬ adr1 ∈ as, height = 0 → as = ∅ ⊦ [apersistence_add_ind# (save(mkznode(r0, zbrar, boolvar, true, m0)), adr0, istore2, ginval2, gstore2, gstore1, nx, maxino0, ginval; adr, istore, pstate, syn; err0)] ( inv(istore) ∧ istore2 ⊑ istore ∧ (pstate.journal? → nx ≠ [] ∧ pstate.lnum = nx.last ∧ pstate.lnum ∈ gstore2) ∧ (pstate.index? → pstate.lnum ∈ istore) ∧ (pstate = unbuffered → syn) → ⟪if err0 = ESUCCESS then let maxino = 0 in {apersistence_get_iblock_refsize# (adr.lnum, adr0, istore, istore2, ginval2, gstore2, gstore1, nx, maxino0, ginval, pstate, syn; ; maxino); apersistence_set_iblock_refsize# (adr.lnum, maxino + adr.size, adr0, istore2, ginval2, gstore2, gstore1, nx, maxino0, ginval, pstate, syn; istore)}; if err0 = ESUCCESS then zh[r].dirty := false⟫ ( refsize-cons(istore, as0 ∪ (err0 = ESUCCESS ⊃ as ++ adr;as)) ∧ inv(istore) ∧ istore2 ⊑ istore ∧ (pstate.journal? → nx ≠ [] ∧ pstate.lnum = nx.last ∧ pstate.lnum ∈ gstore2) ∧ (pstate.index? → pstate.lnum ∈ istore) ∧ (pstate = unbuffered → syn) ∧ istore3 ⊑ istore ∧ r ∈ zh ∧ (err0 = ESUCCESS → ¬ adr ∈ as) ∧ dom nodes(istore) = dom nodes(istore3) ∪ (err0 = ESUCCESS ⊃ ∅ ++ adr;∅) ∧ (err0 = ESUCCESS → ¬ adr ∈ istore3) ∧ (( btree (rp, r, (err0 = ESUCCESS ⊃ adr;adr1), height, err0 ≠ ESUCCESS, ri, nodes(istore), (err0 = ESUCCESS ⊃ as ++ adr;as), (err0 = ESUCCESS ⊃ (alladrs -- adr1) ++ adr;alladrs), ok) * P) )(zh) ∧ (err0 = ESUCCESS ∨ ⌊err0⌋ ) ∧ (err0 = ESUCCESS → pstate.index? ∧ ¬ zh[r].dirty)))

Heuristic unfold applied rule call right

And obtained the following new goals

Rule argument

pos: right 1

Additional information

Used simplifier rules: apersistence_add_ind# (IND, ROOTADR, ISTORE0, GINVAL, GSTORE, GSTORE0, NL, MAXINO, OS ; ADR, ISTORE, PSTATE, PSYNCED ; ERR ) {if PSTATE.index? ∨ PSTATE = readonly then if PSTATE = readonly then ERR := EROFS else {choose OFFSET, ERR0 with ¬ @(PSTATE.lnum, OFFSET, IND.flashsize) ∈ ISTORE ∧ ERR0 = ESUCCESS ∨ ⌊ERR0⌋ in ADR := @(PSTATE.lnum, OFFSET, IND.flashsize), ERR := ERR0; if ERR = ESUCCESS then {ISTORE[PSTATE.lnum].indlist := ISTORE[PSTATE.lnum].indlist + IND; ISTORE[PSTATE.lnum].ladrlist := ISTORE[PSTATE.lnum].ladrlist + @(ADR.pos, ADR.size)} else ADR := ?, PSTATE := readonly; PSYNCED := ?} else abort };