[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 69 from proof refine-write (previous step)

# apebs = # wlar, apebs[n2] = mkpeb(aehdr, avhdr, buf2, m0, false), vols[v][vtblpnum3] = ⌜n2⌝ , avols[v][vtblpnum3] = mapped(buf2, m), wlar[n2] = wl-entry(m1, used), n ≠ 0, vtblpnum4 ≠ n2, aehdr.valid?, avhdr.valid?, vtblpnum3 < # avols[v], vtblpnum3 < # vols[v], n2 < # wlar, abs(avols, apebs, vols, q), bflipset-cons(bflipset, wlar), ebm-cons(avols), is-aligned(vtblpnum5, EB_PAGE_SIZE), is-aligned(n, EB_PAGE_SIZE), ubi-io-inv(apebs), ubi-io-peb-inv(mkpeb(aehdr, avhdr, buf2, m0, false)), unique-sqns(apebs), valid-ebatbl(apebs, wlar, vols, vtblpnum4), valid-eraseq(q), valid-eraseq(wlar, q), valid-eraseq(apebs, q), valid-global-sqn(apebs, sqnum), valid-vtbl(apebs, vols, wlar, vtblpnum4), valid-wl(apebs, wlar), v ∈ avols, v ∈ vols, vtblpnum5 + n ≤ LEB_SIZE, n3 + n ≤ # buf, n + n3 ≤ # buf, m ≤ vtblpnum5, m0 ≤ vtblpnum5, ¬ VTBL_VOLID ∈ vols ⊦ [fail_or_success#(; ; err); if err = ESUCCESS then apebs[vols[v][vtblpnum3].pnum] := mkpeb (apebs[vols[v][vtblpnum3].pnum].echdr, apebs[vols[v][vtblpnum3].pnum].vidhdr, subarray(apebs[vols[v][vtblpnum3].pnum].data, 0, vtblpnum5) + subarray(buf, n3, n) + mkempbuf(LEB_SIZE - vtblpnum5 - n), vtblpnum5 + n, apebs[vols[v][vtblpnum3].pnum].bad) else {vtblpnum0 := vols[v][vtblpnum3].pnum; vtblpnum := vtblpnum5; n1 := n3; n0 := n; choose n2 with (n2 < n0 ∨ n2 = 0 ∧ n0 = 0) ∧ is-aligned(n2, EB_PAGE_SIZE) in if n2 ≠ 0 then apebs[vtblpnum0] := mkpeb (apebs[vtblpnum0].echdr, apebs[vtblpnum0].vidhdr, subarray(apebs[vtblpnum0].data, 0, vtblpnum) + subarray(buf, n1, n2) + mkempbuf(LEB_SIZE - vtblpnum - n2), vtblpnum + n2, apebs[vtblpnum0].bad)}] ( # apebs = # wlar ∧ unique-sqns(apebs) ∧ valid-global-sqn(apebs, sqnum) ∧ valid-wl(apebs, wlar) ∧ valid-eraseq(apebs, q) ∧ valid-ebatbl(apebs, wlar, vols, vtblpnum4) ∧ valid-vtbl(apebs, vols, wlar, vtblpnum4) ∧ ubi-io-inv(apebs) → ⟪if err ≠ ESUCCESS then {debug#("ubi: failed to write to PEB " + vols[v][vtblpnum3].pnum.toString); let buf1 = mkbuf(vtblpnum5 + n), bitflips = ? in {aubi_io_read_data#(vols[v][vtblpnum3].pnum, 0, 0, vtblpnum5, apebs; buf1; bitflips, err); if err = ESUCCESS then {buf1 := copy(buf, n3, buf1, vtblpnum5, n); debug#("ubi: moving data from PEB " + vols[v][vtblpnum3].pnum.toString); ubi_change#(v, vtblpnum3, vtblpnum5 + n, buf1, EB_PAGE_SIZE; vols, wlar, q, bflipset, vtblpnum4, sqnum, apebs; err)} else debug#("ubi: failed to read data from PEB " + vols[v][vtblpnum3].pnum.toString)}}⟫ ⟨ebm_write#(v, vtblpnum3, vtblpnum5, n3, n, buf; avols; err0)⟩ (abs(avols, apebs, vols, q) ∧ err = err0))

Heuristic unfold applied rule call right

And obtained the following new goals

Rule argument

pos: right 1

Additional information

Used simplifier rules: fail_or_success#(; ; ERR) {choose ERR0 with ⌊ERR0⌋ ∨ ERR0 = ESUCCESS in ERR := ERR0};