| adr = @(pstate.lnum, maxino, ind.flashsize), adr0 = adr1, adr3 = adr2, err0 = ESUCCESS, err0 = err, ginval = ∅, ginval0 = ∅, gstore = ∅, gstore0 = ∅, ind = indexnode(mkbrarray(BRANCH_SIZE), true, 0), istore = istore1[pstate.lnum, istore1[pstate.lnum].indlist:= (istore1[pstate.lnum].indlist + ind)] [pstate.lnum, istore1[pstate.lnum, istore1[pstate.lnum].indlist:= (istore1[pstate.lnum].indlist + ind)][pstate.lnum] .ladrlist:= (istore1[pstate.lnum, istore1[pstate.lnum].indlist:= (istore1[pstate.lnum].indlist + ind)][pstate.lnum].ladrlist + @(adr.pos, adr.size)) ], istore0 = ∅, istore1 = (∅)[n, indexblock([], [], 0)], maxino0 = maxino4, nx = [], pstate = index(n), syn, inv((∅)[n, indexblock([], [], 0)]), pstate.lnum ∈ istore1[pstate.lnum, istore1[pstate.lnum].indlist:= (istore1[pstate.lnum].indlist + ind)], pstate.lnum ∈ istore1, indexnode(mkbrarray(BRANCH_SIZE), true, 0).flashsize ≤ LEB_SIZE, ¬ @(pstate.lnum, maxino, ind.flashsize) ∈ istore1 ∧ err = ESUCCESS ∨ ⌊err⌋ , pstate.index? ∨ pstate.journal? ⊦ [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, err0 = ESUCCESS, ginval = ∅, ginval0 = ∅, gstore = ∅, gstore0 = ∅, ind = indexnode(mkbrarray(BRANCH_SIZE), true, 0), istore = istore1[pstate.lnum, istore1[pstate.lnum].indlist:= (istore1[pstate.lnum].indlist + ind)] [pstate.lnum, istore1[pstate.lnum, istore1[pstate.lnum].indlist:= (istore1[pstate.lnum].indlist + ind)][pstate.lnum] .ladrlist:= (istore1[pstate.lnum, istore1[pstate.lnum].indlist:= (istore1[pstate.lnum].indlist + ind)][pstate.lnum].ladrlist + @(adr.pos, adr.size)) ], istore0 = ∅, istore1 = (∅)[n, indexblock([], [], 0)], maxino0 = maxino4, nx = [], pstate = index(n), syn0, inv(istore), inv((∅)[n, indexblock([], [], 0)]), pstate.lnum ∈ istore1, pstate.lnum ∈ istore1[pstate.lnum, istore1[pstate.lnum].indlist:= (istore1[pstate.lnum].indlist + ind)], indexnode(mkbrarray(BRANCH_SIZE), true, 0).flashsize ≤ LEB_SIZE, pstate.index? → pstate.lnum ∈ istore, pstate = unbuffered → syn, pstate.index? ∨ pstate.journal?, ¬ @(pstate.lnum, maxino, ind.flashsize) ∈ istore1 ∧ err = ESUCCESS ∨ ⌊err⌋ ⊦ ⟪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 = ∅)), pstate.journal?