| # buf = EB_PAGE_SIZE, avol[m5] = mapped(buf0), 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 ≤ # buf0 ⊦ ⟪ebm_avol_read#(m5, logoff0, 0, EB_PAGE_SIZE, avol; buf; err); m0 := 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 < (LEB_SIZE - logoff0) + logoff) |
# buf = EB_PAGE_SIZE, LEB_SIZE = n0 + logoff0, avol[m5] = mapped(buf0), 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 ≤ # buf0, logoff0 ≤ LEB_SIZE ⊦ ⟪ebm_avol_read#(m5, logoff0, 0, EB_PAGE_SIZE, avol; buf; err); m0 := 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 < n0 + logoff)
Used simplifier rules: ⊦ m ≠ n → (m ≤ n ↔ m < n); (s)% ⊦ m < n → m ≤ n; (s)%# buf = n ⊦ subarray(buf, 0, n) = buf; (s)% ⊦ is-encoded(nx0, buf) → (is-encoded(nx1, buf) ↔ nx0 = nx1); (s)%n ≤ m ⊦ n0 = m - n ↔ m = n0 + n; (elim) Used terms: logoff0, LEB_SIZE, n