| pebs[m3] = mkpeb(buf0, m1, false), m3 < # pebs, is-aligned(m2, EB_PAGE_SIZE), is-aligned(n, EB_PAGE_SIZE), mtd-cons(pebs), m1 ≤ m2, m2 + n ≤ PEB_SIZE, n2 + n ≤ # buf ⊦ ⟨fail_or_success#(; ; err); pebs0 := pebs; if err = ESUCCESS then {pebs[m3].data := copy(buf, n2, pebs[m3].data, m2, n); pebs[m3].fill := m2 + n} else choose n1 with (n1 < n ∨ n1 = 0 ∧ n = 0) ∧ is-aligned(n1, EB_PAGE_SIZE) in if n1 ≠ 0 then {pebs[m3].data := copy(buf, n2, pebs[m3].data, m2, n1); pebs[m3].fill := m2 + n1}⟩ (pebs0 = pebs) |
pebs[m3] = mkpeb(buf0, m1, false), m3 < # pebs, is-aligned(n, EB_PAGE_SIZE), is-aligned(m2, EB_PAGE_SIZE), mtd-cons(pebs), n2 + n ≤ # buf, m2 + n ≤ PEB_SIZE, m1 ≤ m2 ⊦ ⟨choose err0 with ⌊err0⌋ ∨ err0 = ESUCCESS in err := err0; pebs0 := pebs; if err = ESUCCESS then {pebs[m3].data := copy(buf, n2, pebs[m3].data, m2, n); pebs[m3].fill := m2 + n} else choose n1 with (n1 < n ∨ n1 = 0 ∧ n = 0) ∧ is-aligned(n1, EB_PAGE_SIZE) in if n1 ≠ 0 then {pebs[m3].data := copy(buf, n2, pebs[m3].data, m2, n1); pebs[m3].fill := m2 + n1}⟩ (pebs0 = pebs)
Used simplifier rules: fail_or_success#(; ; ERR) {choose ERR0 with ⌊ERR0⌋ ∨ ERR0 = ESUCCESS in ERR := ERR0};