| # buf = EB_PAGE_SIZE, LEB_SIZE = n1 + logoff0, avol[m5] = mapped(buf0), buf1 = buf, err = ESUCCESS, err = err0, m5 < # avol, logoff0 < LEB_SIZE, ebm-vol-inv(avol), is-aligned(logoff0, EB_PAGE_SIZE), is-encoded(log0, buf0), is-encoded(log, subarray(buf0, 0, logoff0)), logoff0 + EB_PAGE_SIZE ≤ LEB_SIZE, logoff0 ≤ # buf0, ⌊err0⌋ ∨ err0 = ESUCCESS ⊦ ⟪buf1 := copy(avol[m5].data + mkempbuf(LEB_SIZE - # avol[m5].data), logoff0, buf1, 0, EB_PAGE_SIZE); m0 := EB_PAGE_SIZE; buf := buf1; if err = ESUCCESS then if buf = mkempbuf(# buf) then err := ENOENT else let rnd = ? in {decode_ref_node#(m0, buf; rnd; err); if err = ESUCCESS then log := log + rnd.leb '}; logoff := logoff0 + m0⟫ ( logoff ≤ LEB_SIZE ∧ # buf = m0 ∧ is-aligned(logoff, # buf) ∧ (err = ESUCCESS ∨ err = ENOENT ∨ ⌊err⌋ ) ∧ avol[m5].mapped? ∧ (err = ESUCCESS → logoff ≤ # avol[m5].data ∧ is-encoded(log, subarray(avol[m5].data, 0, logoff))) ∧ (err = ENOENT → is-encoded(log, avol[m5].data)) ∧ LEB_SIZE < n1 + logoff), n1 = 0 |
# buf = EB_PAGE_SIZE, LEB_SIZE = n1 + logoff0, avol[m5] = mapped(buf0), buf1 = buf, err = err0, err = ESUCCESS, avol[m5].mapped?, logoff0 < LEB_SIZE, m5 < # avol, ebm-vol-inv(avol), is-aligned(logoff0, EB_PAGE_SIZE), is-encoded(log, subarray(buf0, 0, logoff0)), is-encoded(log0, buf0), logoff0 + EB_PAGE_SIZE ≤ #(avol[m5].data + mkempbuf(LEB_SIZE - # avol[m5].data)), 0 + EB_PAGE_SIZE ≤ # buf1, logoff0 ≤ # buf0, logoff0 + EB_PAGE_SIZE ≤ LEB_SIZE, LEB_SIZE ≥ # avol[m5].data, ⌊err0⌋ ∨ err0 = ESUCCESS ⊦ ⟪m0 := EB_PAGE_SIZE; buf := copy(avol[m5].data + mkempbuf(LEB_SIZE - # avol[m5].data), logoff0, buf1, 0, EB_PAGE_SIZE); if err = ESUCCESS then if buf = mkempbuf(# buf) then err := ENOENT else let rnd = ? in {decode_ref_node#(m0, buf; rnd; err); if err = ESUCCESS then log := log + rnd.leb '}; logoff := logoff0 + m0⟫ ( logoff ≤ LEB_SIZE ∧ # buf = m0 ∧ is-aligned(logoff, # buf) ∧ (err = ESUCCESS ∨ err = ENOENT ∨ ⌊err⌋ ) ∧ avol[m5].mapped? ∧ (err = ESUCCESS → logoff ≤ # avol[m5].data ∧ is-encoded(log, subarray(avol[m5].data, 0, logoff))) ∧ (err = ENOENT → is-encoded(log, avol[m5].data)) ∧ LEB_SIZE < n1 + logoff), n1 = 0
Used simplifier rules: ⊦ ¬ ⌊ESUCCESS⌋ ; (s)% ⊦ #(buf + buf0) = # buf + # buf0; (s)% ⊦ # mkempbuf(n) = n; (s)%append-a: ⊦ (buf + buf0) + buf1 = buf + buf0 + buf1; from specification array-splice[buffer]% ⊦ n + 0 = n; (s)%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic%c: ⊦ m + n = n + m; from specification nat-basic% ⊦ n ≥ m ↔ m ≤ n; (s)% ⊦ mapped(buf).data = buf; (s)% ⊦ m ≤ m; (s)% ⊦ mapped(buf).mapped?; (s)% ⊦ m ≤ n ↔ ¬ n < m; (ss)%f: ⊦ m < n → n ≠ 0; (forward) from specification nat-basic%fle: ⊦ m < n ∧ n ≤ n0 → m < n0; (forward) from specification nat% ⊦ EB_PAGE_SIZE + n = 0 ↔ false; (s)% ⊦ ¬ n + (m - n) < m; (s)%⊦ n < # avol ∧ avol[n] = mapped(buf) ∧ ebm-vol-inv(avol) → ¬ LEB_SIZE < # buf; (s)