| ginval = ginval3, gstore = gstore3, nx = nx0, remove-refsize0(istore1) = istore1, remove-refsize0(gstore2) = gstore2, elems nx0 ∩ ginval3 = ∅, dom gstore2 ∪ elems nx0 = dom gstore3 ∪ ginval3, pstate ≠ readonly, btree-inv(rp, adr, istore2, istore1, zh, fi, fi0), inv(gstore3[n, groupblock([], [], 0)] \ (ginval3 -- n)), inv(istore1), inv(istore2), inv(gstore2), inv(gstore3 \ ginval3), ri-inj(fi0), ri-inj(fi), istore1 ⊑ istore2, ¬ dups(nx0), ¬ n ∈ nx0, ¬ n ∈ gstore3, pstate.index? → pstate.lnum ∈ istore2, pstate.journal? → nx0 ≠ [] ∧ pstate.lnum = nx0.last ∧ pstate.lnum ∈ gstore3 ⊦ ⟨index_allocate_gnd#(fi, fi0, gstore2, maxino0, ginval2, true; ginval3, gstore3, nx0; err1)⟩ (ginval3 = ginval -- n ∧ gstore3 = gstore[n, groupblock([], [], 0)] ∧ nx0 = nx + n ' ∧ ESUCCESS = err1) |
syn ↔ true, fi = fi1, fi0 = fi2, ginval = ginval3, ginval0 = ginval2, ginval1 = ginval3, gstore = gstore3, gstore0 = gstore2, gstore1 = gstore3, maxino = maxino0, nx = nx0, nx1 = nx0, remove-refsize0(gstore2) = gstore2, remove-refsize0(istore1) = istore1, elems nx0 ∩ ginval3 = ∅, dom gstore2 ∪ elems nx0 = dom gstore3 ∪ ginval3, btree-inv(rp, adr, istore2, istore1, zh, fi2, fi1), inv(gstore3 \ ginval3), inv(gstore2), inv(istore2), inv(istore1), inv(gstore3[n, groupblock([], [], 0)] \ (ginval3 -- n)), ri-inj(fi2), ri-inj(fi1), istore1 ⊑ istore2, pstate.journal? → nx0 ≠ [] ∧ pstate.lnum = nx0.last ∧ pstate.lnum ∈ gstore3, pstate.index? → pstate.lnum ∈ istore2 ⊦ ⟨if syn then {fail_or_success#(; ; err); if err = ESUCCESS then choose n with ¬ n ∈ gstore in gstore[n] := groupblock([], [], 0), nx := nx + n, ginval := ginval -- n} else abort⟩ (ginval = ginval1 -- n ∧ gstore = gstore1[n, groupblock([], [], 0)] ∧ nx = nx1 + n ' ∧ ESUCCESS = err), pstate = readonly, dups(nx0), n ∈ nx0, n ∈ gstore3
Used simplifier rules: index_allocate_gnd# (PRI, PFI, PSTORE0, PMAXINO, P_OS, ISYNCED; PINVAL, PSTORE, PNL; ERR) {if ISYNCED then {fail_or_success#(; ; ERR); if ERR = ESUCCESS then choose N with ¬ N ∈ PSTORE in PSTORE[N] := groupblock([], [], 0), PNL := PNL + N, PINVAL := PINVAL -- N} else abort };