| zh[r0] = mkznode(r, zbrar, boolvar, true, m0), adr0 = adr1, istore1 = istore, pstate = index(m), 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), r0 ∈ zh, m ∈ istore, istore0 ⊑ istore, ∃ height, dirty, as, alladrs. ((btree(null, r0, adr1, height, dirty, ri, nodes(istore), as, alladrs, ok) * true))(zh) ∧ refsize-cons(istore, as) ∧ adr1 ∈ istore ∧ alladrs ⊆ dom nodes(istore), ∃ height, dirty, as, alladrs. ((btree(null, null, adr1, height, false, fi, nodes(istore0), as, alladrs, ok) * true))(zh) ∧ refsize-cons(istore0, as) ∧ alladrs ⊆ dom nodes(istore) ⊦ ⟪btree_commit_rec#(r0, adr1, istore0, ginval, gstore, gstore0, nx, ino, ns; adr1, err, zh, istore, pstate, bv)⟫ ( istore1 ⊑ istore ∧ (pstate.journal? → nx ≠ [] ∧ pstate.lnum = nx.last ∧ pstate.lnum ∈ gstore) ∧ (pstate.index? → pstate.lnum ∈ istore) ∧ (pstate = unbuffered → bv) ∧ inv(istore) ∧ istore0 ⊑ istore ∧ (err ≠ ESUCCESS → btree-inv(r0, adr0, istore, istore0, zh, ri, fi)) ∧ ( err = ESUCCESS → btree-inv(r0, adr1, istore, istore, zh, ri, ri) ∧ btree-inv (r0, adr0, istore[adr1.lnum, istore[adr1.lnum].ref-size:= (istore[adr1.lnum].ref-size - adr1.size)], istore0, zh[r0, zh[r0].dirty:= true], ri, fi) ∧ ¬ zh[r0].dirty)), dups(nx) |
zh[r0] = mkznode(r, zbrar, boolvar, true, m0), adr0 = adr1, istore1 = istore, pstate = index(m), remove-refsize0(istore0) = istore0, remove-refsize0(gstore0) = gstore0, elems nx ∩ ginval = ∅, dom gstore0 ∪ elems nx = dom gstore ∪ ginval, ((btree(null, null, adr1, height0, false, fi, nodes(istore0), alladrs0, alladrs0, ok) * true))(zh), ((btree(null, r0, adr1, height, dirty, ri, nodes(istore), as, alladrs, ok) * true))(zh), inv(istore0), inv(istore), inv(gstore0), inv(gstore \ ginval), refsize-cons(istore0, alladrs0), refsize-cons(istore, as), adr1 ∈ istore, m ∈ istore, r0 ∈ zh, alladrs0 ⊆ dom nodes(istore0), alladrs0 ⊆ dom nodes(istore), alladrs ⊆ dom nodes(istore), as ⊆ dom nodes(istore), as ⊆ alladrs, istore0 ⊑ istore, ¬ dups(nx), ¬ adr1 ∈ as, height = 0 → as = ∅ ⊦ ⟪btree_commit_rec#(r0, adr1, istore0, ginval, gstore, gstore0, nx, ino, ns; adr1, err, zh, istore, pstate, bv)⟫ ( istore1 ⊑ istore ∧ (pstate.journal? → nx ≠ [] ∧ pstate.lnum = nx.last ∧ pstate.lnum ∈ gstore) ∧ (pstate.index? → pstate.lnum ∈ istore) ∧ (pstate = unbuffered → bv) ∧ inv(istore) ∧ istore0 ⊑ istore ∧ (err ≠ ESUCCESS → btree-inv(r0, adr0, istore, istore0, zh, ri, fi)) ∧ ( err = ESUCCESS → btree-inv(r0, adr1, istore, istore, zh, ri, ri) ∧ btree-inv (r0, adr0, istore[adr1.lnum, istore[adr1.lnum].ref-size:= (istore[adr1.lnum].ref-size - adr1.size)], istore0, zh[r0, zh[r0].dirty:= true], ri, fi) ∧ ¬ zh[r0].dirty))
Used simplifier rules: ⊦ as ⊆ as; (s)%btree-clean-alladrs: ⊦ (( btree(rp, r, adr, height, false, ri, iast, as, alladrs, nstat) * P) )(zh) → as = alladrs; (forward) from specification btree-inv%btree-adrs: ⊦ (( btree (rp, rp0, adr0, height, dirty, fi, iast, as, alladrs, nstat) * P) )(zh) → as ⊆ dom iast; (forward) from specification btree-inv%btree-refed-subseteq-alladrs: ⊦ (( btree(rp, r, adr, height, dirty, fi, iast, as, alladrs, nstat) * P) )(zh) → as ⊆ alladrs; (forward) from specification btree-inv%btree-dirty-adr-notin: ⊦ r ∈ zh ∧ zh[r] = mkznode(rp0, zbrar, boolvar, true, height0) ∧ (( btree (rp, r, adr, height, dirty, ri, iast, as, alladrs, nstat) * P) )(zh) → ¬ adr ∈ as ∧ (height = 0 → as = ∅); (forward) from specification btree-inv%sep-com: ⊦ P * P2 = P2 * P; from specification heap-sep[zheap]%sep-ass: ⊦ (P * P3) * P4 = P * P3 * P4; from specification heap-sep[zheap]