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