| remove-refsize0(gstore0) = gstore0, remove-refsize0(istore0) = istore0, elems nx ∩ ginval = ∅, dom gstore0 ∪ elems nx = dom gstore ∪ ginval, inv(gstore \ ginval), inv(gstore0), inv(istore), inv(istore0), istore0 ⊑ istore, ¬ dups(nx), pstate.journal? → nx ≠ [] ∧ pstate.lnum = nx.last ∧ pstate.lnum ∈ gstore, pstate.index? → pstate.lnum ∈ istore ⊦ ⟪apersistence_allocate_gnd#(adr, istore, istore0, gstore0, maxino, ginval0, true; ginval, gstore, nx, pstate; err)⟫ ( inv(gstore \ ginval) ∧ elems nx ∩ ginval = ∅ ∧ ¬ dups(nx) ∧ dom gstore0 ∪ elems nx = dom gstore ∪ ginval ∧ (pstate.journal? → nx ≠ [] ∧ pstate.lnum = nx.last ∧ pstate.lnum ∈ gstore) ∧ (pstate.index? → pstate.lnum ∈ istore)) |
syn ↔ true, istore = istore1, istore0 = istore2, remove-refsize0(istore1) = istore1, remove-refsize0(gstore0) = gstore0, elems nx ∩ ginval = ∅, dom gstore0 ∪ elems nx = dom gstore ∪ ginval, inv(istore1), inv(istore2), inv(gstore0), inv(gstore \ ginval), istore1 ⊑ istore2, pstate.index? → pstate.lnum ∈ istore2, pstate.journal? → nx ≠ [] ∧ pstate.lnum = nx.last ∧ pstate.lnum ∈ gstore ⊦ ⟪if syn then if pstate = readonly then err := EROFS else {fail_or_success#(; ; err); if err = ESUCCESS then choose n with ¬ n ∈ gstore in gstore[n] := groupblock([], [], 0), nx := nx + n, ginval := ginval -- n, pstate := journal(n)} else abort⟫ ( inv(gstore \ ginval) ∧ elems nx ∩ ginval = ∅ ∧ ¬ dups(nx) ∧ dom gstore0 ∪ elems nx = dom gstore ∪ ginval ∧ (pstate.journal? → nx ≠ [] ∧ pstate.lnum = nx.last ∧ pstate.lnum ∈ gstore) ∧ (pstate.index? → pstate.lnum ∈ istore2)), dups(nx)
Used simplifier rules: allocate-gnd: ⊦ ;