[Imprint][Data Privacy Statement][E-Mail]



View long theorem info. View the proof. Back to main index. View the specification. View theorem base summary, View theorem base listing, the used properties by spec, the dependency list, the symbol table,

Proof step 23 from proof inv-change (previous step)

# apebs = # wlar, # apebs1 = # wlar0, q.head = eq-entry(m, lref), LEB_SIZE = n1 + n0, wlar0[vtblpnum] = wl-entry(m0, free), apebs1[vtblpnum] = mkpeb(aehdr, empty, mkempbuf(LEB_SIZE), 0, false), vols0 = vols, vtblpnum4 ≠ vtblpnum, aehdr.valid?, vtblpnum3 < # vols[v], vtblpnum < # wlar0, bflipset-cons(bflipset, wlar), bflipset-cons(bflipset, wlar0), id(apebs1, apebs, mapped-pebs(vols)), is-aligned(n0, EB_PAGE_SIZE), ubi-io-inv(apebs), ubi-io-inv(apebs1), unique-sqns(apebs), unique-sqns(apebs1), valid-ebatbl(apebs, wlar, vols, vtblpnum4), valid-ebatbl(apebs1, wlar0, vols, vtblpnum4), valid-eraseq(q), valid-eraseq(wlar, q), valid-eraseq(apebs, q), valid-eraseq(q1), valid-eraseq(wlar0, q1), valid-eraseq(apebs1, q1), valid-global-sqn(apebs, sqnum), valid-global-sqn(apebs1, sqnum), valid-vtbl(apebs, vols, wlar, vtblpnum4), valid-vtbl(apebs1, vols, wlar0, vtblpnum4), valid-wl(apebs, wlar), valid-wl(apebs1, wlar0), v ∈ vols, n0 ≤ LEB_SIZE, n0 ≤ # buf, q1.lebrefs ⊆ q.lebrefs, ¬ vtblpnum4 ∈ q, ¬ VTBL_VOLID ∈ vols, ¬ vtblpnum4 ∈ q1, apebs = apebs1 ∧ wlar = wlar0 ∧ q = q1 ∨ id○(apebs, apebs1, vtblpnum) ∧ id○(wlar, wlar0, vtblpnum) ∧ q = eq-entry(vtblpnum, lref) ' + q1 ⊦ ⟪ubi_atomic_leb_change#(v, vtblpnum3, vtblpnum, n0, buf, EB_PAGE_SIZE; vols, wlar0, q1, bflipset, vtblpnum4, sqnum, apebs1; err); if err ≠ ESUCCESS then debug#("ubi: change to PEB " + vtblpnum.toString + " failed")⟫ ( # apebs1 = # wlar0 ∧ unique-sqns(apebs1) ∧ valid-global-sqn(apebs1, sqnum) ∧ valid-wl(apebs1, wlar0) ∧ valid-eraseq(q1) ∧ valid-eraseq(wlar0, q1) ∧ valid-eraseq(apebs1, q1) ∧ ¬ VTBL_VOLID ∈ vols ∧ bflipset-cons(bflipset, wlar0) ∧ valid-ebatbl(apebs1, wlar0, vols, vtblpnum4) ∧ valid-vtbl(apebs1, vols, wlar0, vtblpnum4) ∧ ubi-io-inv(apebs1) ∧ (err = ESUCCESS ∨ ⌊err⌋ ) ∧ (err ≠ ESUCCESS → vols = vols0 ∧ id(apebs1, apebs, mapped-pebs(vols0)) ∧ q1.lebrefs ⊆ q.lebrefs) ∧ ( err = ESUCCESS → v ∈ vols0 ∧ vtblpnum3 < # vols0[v] ∧ q1.lebrefs ⊆ q.lebrefs ++ (v × vtblpnum3) ∧ (vols0[v][vtblpnum3] ≠ unmapped → id(apebs1, apebs, mapped-pebs(vols0) -- vols0[v][vtblpnum3].pnum)) ∧ (vols0[v][vtblpnum3] = unmapped → id(apebs1, apebs, mapped-pebs(vols0))) ∧ (∃ n. vols = vols0[v, vols0[v][vtblpnum3, ⌜n⌝ ]] ∧ apebs1[n].data = subarray(buf, 0, n0) + mkempbuf(n1) ∧ apebs1[n].fill = align↑(datasize(buf, n0), EB_PAGE_SIZE))))

User applied rule insert program lemma

And obtained the following new goals

Rule argument

spec: <toplevel> name: prepost-atomic-leb-change seq: ubi-cons(apebs, vols, wlar, q, bflipset, vtblpnum, sqnum), ubi-io-inv(apebs), n0 ≤ # buf, n < # wlar, n0 ≤ LEB_SIZE, wlar[n].status = free, apebs0 = apebs, is-aligned(n0, EB_PAGE_SIZE), v ∈ vols ∧ m < # vols[v] ∨ v = VTBL_VOLID ∧ m = VTBL_LNUM, vols0 = vols, q0 = q, vtblpnum0 = vtblpnum ⊦ ⟪ubi_atomic_leb_change# (v, m, n, n0, buf, EB_PAGE_SIZE ; vols, wlar, q, bflipset, vtblpnum, sqnum, apebs ; err)⟫ ( (err = ESUCCESS ∨ ⌊err⌋ ) ∧ id○(apebs, apebs0, n) ∧ ubi-io-inv(apebs) ∧ # apebs = # wlar ∧ unique-sqns(apebs) ∧ valid-global-sqn(apebs, sqnum) ∧ valid-wl(apebs, wlar) ∧ valid-eraseq(q) ∧ valid-eraseq(wlar, q) ∧ valid-eraseq(apebs, q) ∧ ¬ VTBL_VOLID ∈ vols ∧ bflipset-cons(bflipset, wlar) ∧ ( v ∈ vols0 ∨ is-encoded(to-vtbl(vols0), subarray(buf, 0, n0)) ∧ n0 = LEB_SIZE ∨ err ≠ ESUCCESS → valid-ebatbl(apebs, wlar, vols, vtblpnum) ∧ valid-vtbl(apebs, vols, wlar, vtblpnum)) ∧ ( err = ESUCCESS ∧ v = VTBL_VOLID ∧ m = VTBL_LNUM → (∀ v0, m0. ¬ v0 ∈ vols0 ∧ is-encoded (to-vtbl(vols0)[v0, m0], subarray(buf, 0, n0)) ∧ n0 = LEB_SIZE → valid-ebatbl (apebs, wlar, vols[v0, fill(mkebatbl(m0), unmapped)], vtblpnum) ∧ valid-vtbl (apebs, vols[v0, fill(mkebatbl(m0), unmapped)], wlar, vtblpnum))) ∧ ( err = ESUCCESS ∧ v ∈ vols0 ∧ vols0[v][m] ≠ unmapped → q = q0 + eq-entry(vols0[v][m].pnum, v × m)) ∧ ( err = ESUCCESS ∧ v = VTBL_VOLID ∧ m = VTBL_LNUM → q = q0 + eq-entry(vtblpnum0, v × m)) ∧ id(apebs, apebs0, mapped-pebs(vols0)) ∧ ( v = VTBL_VOLID ∧ m = VTBL_LNUM ∨ err ≠ ESUCCESS → vols = vols0) ∧ ( v ∈ vols0 ∧ err = ESUCCESS → vols = vols0[v, vols0[v][m, ⌜n⌝ ]]) ∧ ( err = ESUCCESS → apebs[n].fill = align↑(datasize(buf, n0), EB_PAGE_SIZE) ∧ apebs[n].data = subarray(buf, 0, n0) + mkempbuf(LEB_SIZE - n0) ∧ q.lebrefs ⊆ q0.lebrefs ++ (v × m)) ∧ (err ≠ ESUCCESS → q.lebrefs = q0.lebrefs)) subst: [buf, n0, n, m, v, apebs, sqnum, vtblpnum, bflipset, q, wlar, vols, err, apebs0, vols0, q0, vtblpnum0] → [buf, n0, vtblpnum, vtblpnum3, v, apebs1, sqnum, vtblpnum4, bflipset, q1, wlar0, vols, err, apebs1, vols, q1, vtblpnum4] flags: <all paths>

Additional information

Used simplifier rules: ⊦ ubi-cons(apebs, vols, wlar, q, bflipset, n0, n1) ↔ # apebs = # wlar ∧ unique-sqns(apebs) ∧ valid-global-sqn(apebs, n1) ∧ valid-wl(apebs, wlar) ∧ valid-eraseq(q) ∧ valid-eraseq(wlar, q) ∧ valid-eraseq(apebs, q) ∧ ¬ VTBL_VOLID ∈ vols ∧ bflipset-cons(bflipset, wlar) ∧ valid-ebatbl(apebs, wlar, vols, n0) ∧ valid-vtbl(apebs, vols, wlar, n0); (s)% ⊦ wl-entry(m, stat).status = stat; (s)