| adr = adr2, adr0 = adr1, ginval = ∅, ginval0 = ∅, gstore = ∅, gstore0 = ∅, ind = indexnode(mkbrarray(BRANCH_SIZE), true, 0), istore = (∅)[n, indexblock([], [], 0)], istore0 = ∅, maxino0 = maxino4, nx = [], pstate = index(n), syn, inv((∅)[n, indexblock([], [], 0)]), indexnode(mkbrarray(BRANCH_SIZE), true, 0).flashsize ≤ LEB_SIZE, pstate.index? ∨ pstate.journal?, ¬ @(pstate.lnum, maxino, ind.flashsize) ∈ istore ∧ err = ESUCCESS ∨ ⌊err⌋ ⊦ [adr := @(pstate.lnum, maxino, ind.flashsize), err0 := err; if err0 = 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; syn := ?] ( inv(istore) ∧ ¬ pstate.journal? ∧ (pstate.index? → pstate.lnum ∈ istore) ∧ (pstate = unbuffered → syn) → ⟪nx := []; maxino1 := maxino4; istore0 := ∅; gstore0 := ∅; gstore := ∅; ginval0 := ∅; ginval := ∅; err1 := err0, adr2 := adr; if err1 = ESUCCESS then apersistence_set_iblock_refsize# (adr2.lnum, indexnode(mkbrarray(BRANCH_SIZE), true, 0).flashsize, adr1, istore0, ginval0, gstore0, gstore, nx, maxino1, ginval, pstate, syn ; istore); if err1 = ESUCCESS then apersistence_sync#(adr1, istore, istore0, ginval0, gstore0, gstore, nx, maxino1, ginval; pstate, syn; err1); if err1 = ESUCCESS then let ns = ∅ in apersistence_commit#(adr2, maxino4, syn; ns, istore, ginval0, gstore0, adr1, istore0, gstore, nx, maxino1, ginval; pstate, err1)⟫ ( ( err1 = ESUCCESS → syn ∧ (∃ ri, fi. btree-inv(null, adr1, istore, istore0, zh, ri, fi)) ∧ inv(gstore0 \ ginval0) ∧ inv(gstore) ∧ elems nx ∩ ginval0 = ∅ ∧ ¬ dups(nx) ∧ dom gstore ∪ elems nx = dom gstore0 ∪ ginval0 ∧ remove-refsize0(gstore) = gstore ∧ inv(istore) ∧ inv(istore0) ∧ istore0 ⊑ istore ∧ remove-refsize0(istore0) = istore0 ∧ (pstate.journal? → nx ≠ [] ∧ pstate.lnum = nx.last ∧ pstate.lnum ∈ gstore0) ∧ (pstate.index? → pstate.lnum ∈ istore)) ∧ (err1 = ESUCCESS ∨ ⌊err1⌋ ) ∧ ( err1 = ESUCCESS → btree-inv(null, adr1, istore, istore0, zh, ∅, ∅) ∧ gstore0 = ∅ ∧ ginval0 = ∅ ∧ maxino1 = maxino4 ∧ nx = [] ∧ ginval = ∅))) |
adr = @(pstate.lnum, maxino, ind.flashsize), adr0 = adr1, adr3 = adr2, err0 = err, ginval = ∅, ginval0 = ∅, gstore = ∅, gstore0 = ∅, ind = indexnode(mkbrarray(BRANCH_SIZE), true, 0), istore = (∅)[n, indexblock([], [], 0)], istore0 = ∅, maxino0 = maxino4, nx = [], pstate = index(n), syn, inv((∅)[n, indexblock([], [], 0)]), indexnode(mkbrarray(BRANCH_SIZE), true, 0).flashsize ≤ LEB_SIZE, ¬ @(pstate.lnum, maxino, ind.flashsize) ∈ istore ∧ err = ESUCCESS ∨ ⌊err⌋ , pstate.index? ∨ pstate.journal? ⊦ [if err0 = 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; syn := ?] ( inv(istore) ∧ ¬ pstate.journal? ∧ (pstate.index? → pstate.lnum ∈ istore) ∧ (pstate = unbuffered → syn) → ⟪nx := []; maxino1 := maxino4; istore0 := ∅; gstore0 := ∅; gstore := ∅; ginval0 := ∅; ginval := ∅; err1 := err0, adr2 := adr; if err1 = ESUCCESS then apersistence_set_iblock_refsize# (adr2.lnum, indexnode(mkbrarray(BRANCH_SIZE), true, 0).flashsize, adr1, istore0, ginval0, gstore0, gstore, nx, maxino1, ginval, pstate, syn ; istore); if err1 = ESUCCESS then apersistence_sync#(adr1, istore, istore0, ginval0, gstore0, gstore, nx, maxino1, ginval; pstate, syn; err1); if err1 = ESUCCESS then let ns = ∅ in apersistence_commit#(adr2, maxino4, syn; ns, istore, ginval0, gstore0, adr1, istore0, gstore, nx, maxino1, ginval; pstate, err1)⟫ ( ( err1 = ESUCCESS → syn ∧ (∃ ri, fi. btree-inv(null, adr1, istore, istore0, zh, ri, fi)) ∧ inv(gstore0 \ ginval0) ∧ inv(gstore) ∧ elems nx ∩ ginval0 = ∅ ∧ ¬ dups(nx) ∧ dom gstore ∪ elems nx = dom gstore0 ∪ ginval0 ∧ remove-refsize0(gstore) = gstore ∧ inv(istore) ∧ inv(istore0) ∧ istore0 ⊑ istore ∧ remove-refsize0(istore0) = istore0 ∧ (pstate.journal? → nx ≠ [] ∧ pstate.lnum = nx.last ∧ pstate.lnum ∈ gstore0) ∧ (pstate.index? → pstate.lnum ∈ istore)) ∧ (err1 = ESUCCESS ∨ ⌊err1⌋ ) ∧ ( err1 = ESUCCESS → btree-inv(null, adr1, istore, istore0, zh, ∅, ∅) ∧ gstore0 = ∅ ∧ ginval0 = ∅ ∧ maxino1 = maxino4 ∧ nx = [] ∧ ginval = ∅)))