| # 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) |
# buf = EB_PAGE_SIZE, LEB_SIZE = n0 + logoff0, avol[m5] = mapped(buf0), n0 ≠ 0, 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 ⊦ ⟪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: c: ⊦ m + n = n + m; from specification nat-basic%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic% ⊦ m < m + n ↔ n ≠ 0; (s)%lf-01: ⊦ m < n ∧ n = n0 → m < n0; (forward) from specification nat-basic% ⊦ m < n → m ≤ n; (s)