| m < # avols[default-volid], ebm-cons(avols), is-aligned(n, EB_PAGE_SIZE), default-volid ∈ avols, n ≤ # buf, n ≤ LEB_SIZE ⊦ [ebm_change#(default-volid, m, n, buf; avols; err)] (ebm-cons(avols) → default-volid ∈ avols) |
v = default-volid, m < # avols[default-volid], ebm-cons(avols), is-aligned(n, EB_PAGE_SIZE), default-volid ∈ avols, n ≤ LEB_SIZE, n ≤ # buf ⊦ [if v ∈ avols ∧ m < # avols[v] ∧ n ≤ LEB_SIZE ∧ n ≤ # buf ∧ is-aligned(n, EB_PAGE_SIZE) then {fail_or_success#(; ; err); if err = ESUCCESS then avols[v][m] := mapped(subarray(buf, 0, n) + mkempbuf(LEB_SIZE - n), n)} else abort] (ebm-cons(avols) → default-volid ∈ avols)
Used simplifier rules: ebm_change#(VOLID, LNUM, N, BUF; AVOLS; ERR) {if VOLID ∈ AVOLS ∧ LNUM < # AVOLS[VOLID] ∧ N ≤ LEB_SIZE ∧ N ≤ # BUF ∧ is-aligned(N, EB_PAGE_SIZE) then {fail_or_success#(; ; ERR); if ERR = ESUCCESS then AVOLS[VOLID][LNUM] := mapped(subarray(BUF, 0, N) + mkempbuf(LEB_SIZE - N), N)} else abort };