| avols[default-volid][m2] = mapped(buf0, n4), avol = abs(avols[default-volid]), err = err0, m = m1, m0 = m2, n0 = n, n1 = n3, v = default-volid, avols[v][m0].mapped?, m0 < # avols[v], n2 < n0, m2 < # avols[default-volid], ebm-cons(avols), ebm-vol-inv(abs(avols[default-volid])), is-aligned(n2, EB_PAGE_SIZE), is-aligned(n, EB_PAGE_SIZE), is-aligned(m1, EB_PAGE_SIZE), v ∈ avols, default-volid ∈ avols, 0 + m ≤ # avols[v][m0].data, n1 + n2 ≤ # buf, n3 + n ≤ # buf, m1 + n ≤ LEB_SIZE, n4 ≤ m1, LEB_SIZE - m ≥ n2, LEB_SIZE ≥ m, ⌊err0⌋ ∨ err0 = ESUCCESS ⊦ ⟨ebm_avol_write#(m2, m1, n3, n, buf; avol; err1)⟩ ( avol = abs (avols[v, avols[v][m0, mapped(subarray(avols[v][m0].data, 0, m) + subarray(buf, n1, n2) + mkempbuf(LEB_SIZE - m - n2), m + n2)]] [default-volid ]) ∧ err = err1), err = ESUCCESS, n2 = 0 |
avols[default-volid][m2] = mapped(buf0, n4), avol = abs(avols[default-volid]), n2 ≠ 0, n2 < n, m2 < # avols[default-volid], ebm-cons(avols), ebm-vol-inv(abs(avols[default-volid])), is-aligned(m1, EB_PAGE_SIZE), is-aligned(n, EB_PAGE_SIZE), is-aligned(n2, EB_PAGE_SIZE), default-volid ∈ avols, n4 ≤ LEB_SIZE, m1 ≤ LEB_SIZE, n2 + m1 ≤ LEB_SIZE, n4 ≤ m1, m1 + n ≤ LEB_SIZE, n3 + n ≤ # buf, n3 + n2 ≤ # buf, ⌊err0⌋ ⊦ ⟨ebm_avol_write#(m2, m1, n3, n, buf; avol; err1)⟩ ( avol = abs (avols[default-volid] [m2, mapped(subarray(avols[default-volid][m2].data, 0, m1) + subarray(buf, n3, n2) + mkempbuf(LEB_SIZE - m1 - n2), m1 + n2) ]) ∧ err0 = err1)
Used simplifier rules: elim-mapped: ⊦ leb.mapped? ↔ (∃ buf, m. leb = mapped(buf, m));%⊦ v ∈ avols ∧ m < # avols[v] ∧ avols[v][m] = mapped(buf, m0) ∧ ebm-cons(avols) → # buf = LEB_SIZE; (s)% ⊦ mapped(buf, m).data = buf; (s)% ⊦ m < n → n ≠ 0; (s)% ⊦ mapped(buf, m) = mapped(buf0, m0) ↔ buf = buf0 ∧ m = m0; (ws)%let: ⊦ n ≤ n0 ∧ n0 ≤ n1 → n ≤ n1; (forward) from specification nat%f: ⊦ m < n → n ≠ 0; (forward) from specification nat-basic% ⊦ avols[v, evol][v] = evol; (s)% ⊦ ⌊err⌋ → err ≠ ESUCCESS; (s)%c: ⊦ m + n = n + m; from specification nat-basic%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic% ⊦ n + 0 = n; (s)%n0 ≤ n ⊦ m ≤ n - n0 ↔ m + n0 ≤ n; (s)% ⊦ m ≤ n → (n < m ↔ false); (s)% ⊦ m ≤ n ↔ ¬ n < m; (ss)% ⊦ n ≥ m ↔ m ≤ n; (s)