| avol[0] = mapped(buf1), buf = mkbuf(m2), buf0 = buf, m = 0, m0 = 0, m1 = EB_PAGE_SIZE, m2 = LEB_SIZE, n = m2, n0 = 0, ebm-vol-inv(avol), is-encoded(sb0, buf1) ⊦ ⟪if m0 < # avol ∧ avol[m0].mapped? ∧ n0 + n ≤ # buf0 ∧ m + n ≤ LEB_SIZE then {fail_or_success#(; ; err); if err = ESUCCESS then buf0 := copy(avol[m0].data + mkempbuf(LEB_SIZE - # avol[m0].data), m, buf0, n0, n) else choose buf with # buf = # buf0 ∧ range=(buf0, 0, buf, 0, n0) ∧ range=(buf0, n0 + n, buf, n0 + n, # buf0 - n0 + n) in buf0 := buf} else abort; if err = ESUCCESS then let m = ? in decode_superblock#(0, buf0, m1; sb, m; err)⟫ ((err = ESUCCESS ∨ ⌊err⌋ ) ∧ (err = ESUCCESS → sb = sb0)), # avol = 0 |
avol[0] = mapped(buf1), buf = mkbuf(m2), buf0 = buf, m = 0, m0 = 0, m1 = EB_PAGE_SIZE, m2 = LEB_SIZE, n = m2, n0 = 0, ebm-vol-inv(avol), is-encoded(sb0, buf1) ⊦ ⟪fail_or_success#(; ; err); if err = ESUCCESS then buf0 := copy(avol[m0].data + mkempbuf(LEB_SIZE - # avol[m0].data), m, buf0, n0, n) else choose buf with # buf = # buf0 ∧ range=(buf0, 0, buf, 0, n0) ∧ range=(buf0, n0 + n, buf, n0 + n, # buf0 - n0 + n) in buf0 := buf; if err = ESUCCESS then let m = ? in decode_superblock#(0, buf0, m1; sb, m; err)⟫ ((err = ESUCCESS ∨ ⌊err⌋ ) ∧ (err = ESUCCESS → sb = sb0)), # avol = 0
Used simplifier rules: ⊦ 0 < m ↔ m ≠ 0; (s)% ⊦ mapped(buf).mapped?; (s)% ⊦ n + 0 = n; (s)%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic%c: ⊦ m + n = n + m; from specification nat-basic% ⊦ # mkbuf(n) = n; (s)% ⊦ m ≤ m; (s)% ⊦ m ≤ n ↔ ¬ n < m; (ss)%f: ⊦ m < n → n ≠ 0; (forward) from specification nat-basic%lf-02: ⊦ m < n ∧ m = n0 → n0 < n; (forward) from specification nat-basic%lf-01: ⊦ m < n ∧ n = n0 → m < n0; (forward) from specification nat-basic% ⊦ LEB_SIZE ≠ 0; (s)% ⊦ ¬ n < n; (s)