| # avol1 = # lpt4, # lpt = # lpt4, lpt[n].ref-size = 0, isbuf ↔ boolvar, avol0 = avol1, bleb = nobuffer, keyset(gch0) = gc-heap(lpt4, []), keyset(gch) = gc-heap(cleanup-lpt(lpt4, n), []), lpt = lpt3, lpt0 = lpt1, lpt2 = lpt4, m = m0, n = n0, n1 = 0, n < # lpt, n < # lpt[n, lpt[n].flags:= LP_FREE], avol-cleanup-lpt-unchanged(avol1, avol, lpt4), awbuf-inv(avol1, nobuffer), awbuf-inv(avol, bleb), bin-heap-inv(gch0, lpt4), bin-heap-inv(gch, lpt), freelist-cons(lpt4, freelist0), freelist-cons(lpt, freelist), id-idx(cleanup-lpt(lpt4, n), lpt), synced(avol1), synced(avol), n ≤ # lpt, lpt[n].ref-size = 0 → n < # lpt ⊦ ⟪awbuf_unmap#(n, adr, m, log, lpt0, ns, bleb, isbuf; avol); n1 := n + 1⟫ ( ( n1 ≤ # lpt[n, lpt[n].flags:= LP_FREE][n, lpt[n, lpt[n].flags:= LP_FREE][n].size:= 0] ∧ # lpt[n, lpt[n].flags:= LP_FREE][n, lpt[n, lpt[n].flags:= LP_FREE][n].size:= 0] = # lpt4 ∧ id-idx(cleanup-lpt(lpt4, n1), lpt[n, lpt[n].flags:= LP_FREE][n, lpt[n, lpt[n].flags:= LP_FREE][n].size:= 0]) ∧ awbuf-inv(avol, bleb) ∧ avol-cleanup-lpt-unchanged(avol1, avol, lpt4) ∧ freelist-cons(lpt[n, lpt[n].flags:= LP_FREE][n, lpt[n, lpt[n].flags:= LP_FREE][n].size:= 0], freelist + n) ∧ keyset(gch) = gc-heap(cleanup-lpt(lpt4, n1), []) ∧ bin-heap-inv(gch, lpt[n, lpt[n].flags:= LP_FREE][n, lpt[n, lpt[n].flags:= LP_FREE][n].size:= 0]) ∧ bleb = nobuffer ∧ synced(avol)) ∧ # lpt[n, lpt[n].flags:= LP_FREE][n, lpt[n, lpt[n].flags:= LP_FREE][n].size:= 0] - n1 < # lpt3 - n0), lpt[n].flags = LP_FREE, lpt[n].flags = LP_GROUP_NODES |
# avol1 = # lpt4, # lpt3 = # lpt4, lpt3[n0].ref-size = 0, keyset(gch0) = gc-heap(lpt4, []), keyset(gch) = gc-heap(cleanup-lpt(lpt4, n0), []), lpt3[n0].flags ≠ LP_FREE, lpt3[n0].flags ≠ LP_GROUP_NODES, n0 < # lpt4, avol-cleanup-lpt-unchanged(avol1, avol, lpt4), awbuf-inv(avol1, nobuffer), awbuf-inv(avol, nobuffer), bin-heap-inv(gch0, lpt4), bin-heap-inv(gch, lpt3), freelist-cons(lpt4, freelist0), freelist-cons(cleanup-lpt(lpt4, n0), freelist), id-idx(cleanup-lpt(lpt4, n0), lpt3), synced(avol1), synced(avol) ⊦ ⟪awbuf_unmap#(n0, adr, m, log, lpt0, ns, nobuffer, isbuf; avol); n1 := n0 + 1⟫ ( n1 ≤ # lpt4 ∧ id-idx(cleanup-lpt(lpt4, n1), lpt3[n0, mklp(lpt3[n0].ref-size, 0, LP_FREE, lpt3[n0].gcheapidx)]) ∧ awbuf-inv(avol, nobuffer) ∧ avol-cleanup-lpt-unchanged(avol1, avol, lpt4) ∧ freelist-cons(cleanup-lpt(lpt4, n1), freelist + n0 ') ∧ keyset(gch) = gc-heap(cleanup-lpt(lpt4, n1), []) ∧ bin-heap-inv(gch, lpt3[n0, mklp(lpt3[n0].ref-size, 0, LP_FREE, lpt3[n0].gcheapidx)]) ∧ # lpt4 < (# lpt4 - n0) + n1)
Used simplifier rules: elim-lp-upd-size: ⊦ lp.size:= n = mklp(lp.ref-size, n, lp.flags, lp.gcheapidx);%fle: ⊦ m < n ∧ n ≤ n0 → m < n0; (forward) from specification nat% ⊦ m ≤ n ↔ ¬ n < m; (ss)% ⊦ awbuf-inv(avol, nobuffer) → (synced(avol) ↔ true); (ss)% ⊦ m +1 = m + 1; (s)%c: ⊦ m + n = n + m; from specification nat-basic%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic% ⊦ m < m + n ↔ n ≠ 0; (s)%transitivity: ⊦ n < n0 ∧ n0 < n1 → n < n1; (forward) from specification oelem[nat-set]%lf: ⊦ m < n ∧ n < n0 → m +1 < n0; (forward) from specification nat-basic%lf-02: ⊦ m < n ∧ m = n0 → n0 < n; (forward) from specification nat-basic%n0 ≤ n ⊦ n - n0 < m ↔ n < m + n0; (s)% ⊦ m ≤ n → (n < m ↔ false); (s)% ⊦ m < n → n ≠ 0; (s)% ⊦ n < m → m - n ≠ 0; (s)%lf-01: ⊦ m < n ∧ n = n0 → m < n0; (forward) from specification nat-basic%fle-01: ⊦ m ≤ n ∧ n < n0 → m < n0; (forward) from specification nat%f: ⊦ m < n → n ≠ 0; (forward) from specification nat-basic% ⊦ nx + n = nx + n '; (s)%m < # lpt ⊦ lpt[m, lp][m, lp0] = lpt[m, lp0]; (s)% ⊦ m < n ↔ ¬ n ≤ m; (ss)% ⊦ (lp.flags:= lpf).gcheapidx = lp.gcheapidx; (s)% ⊦ (lp.flags:= lpf).flags = lpf; (s)% ⊦ (lp.flags:= lpf).ref-size = lp.ref-size; (s)% ⊦ m < # lpt → lpt[m, lp][m] = lp; (s)% ⊦ # lpt[n, lp] = # lpt; (s)%⊦ id-idx(lpt0, lpt1) → (freelist-cons(lpt1, freelist) ↔ freelist-cons(lpt0, freelist)); (s)% ⊦ m < n → m ≤ n; (s)