[Imprint][Data Privacy Statement][E-Mail]



View long theorem info. View the proof. Back to main index. View the specification. View theorem base summary, View theorem base listing, the used properties by spec, the dependency list, the symbol table,

Proof step 13 from proof inv-io-read (previous step)

# buf = n1 + n0 + n, pebs[m3] = mkpeb(buf1, m2, false), buf0 = buf, err = EIO, m = 0, m1 = m3, m3 < # pebs, mtd-cons(pebs), n0 + n ≤ # buf, m0 + n ≤ PEB_SIZE ⊦ ⟪while err ≠ ESUCCESS ∧ m ≤ UBI_READ_RETRIES do {/* (inv-io-read : invariant m1 < # pebs ∧ ¬ pebs[m1].bad ∧ m0 + n ≤ PEB_SIZE ∧ n0 + n ≤ # buf ∧ m ≤ UBI_READ_RETRIES + 1 ∧ # buf = # buf` ∧ range=(buf, 0, buf`, 0, n0) ∧ range=(buf, n0 + n, buf`, n0 + n, # buf` - n0 + n) ∧ (err = ESUCCESS ∨ ⌊err⌋ ) ∧ (err = ESUCCESS → subarray(buf, n0, n) = subarray(pebs[m1].data, m0, n)) wfbound UBI_READ_RETRIES + 1 - m) */; mtd_asm_read#(m1, m0, n0, n, pebs; buf; bitflips, err); if err ≠ ESUCCESS then debug#("ubi-io: failed to read from PEB " + m1.toString); m := m +1}⟫ ( # buf = # buf0 ∧ range=(buf, 0, buf0, 0, n0) ∧ range=(buf, n0 + n, buf0, n0 + n, n1) ∧ (err = ESUCCESS ∨ ⌊err⌋ ) ∧ (err = ESUCCESS → subarray(buf, n0, n) = subarray(buf1, m0, n)))

Heuristic annotation applied rule annotation right

And obtained the following new goals

Rule argument

rule: invariant right arg: bound: UBI_READ_RETRIES + 1 - m inv: m1 < # pebs ∧ ¬ pebs[m1].bad ∧ m0 + n ≤ PEB_SIZE ∧ n0 + n ≤ # buf ∧ m ≤ UBI_READ_RETRIES + 1 ∧ # buf = # buf` ∧ range=(buf, 0, buf`, 0, n0) ∧ range=(buf, n0 + n, buf`, n0 + n, # buf` - n0 + n) ∧ (err = ESUCCESS ∨ ⌊err⌋ ) ∧ ( err = ESUCCESS → subarray(buf, n0, n) = subarray(pebs[m1].data, m0, n)) fmapos: right 1 pos: right 1

Additional information

Used simplifier rules: ⊦ 0 ≤ m; (s)% ⊦ range=(buf, n, buf, n, m) ↔ n + m ≤ # buf; (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% ⊦ m ≤ n ↔ ¬ n < m; (ss)% ⊦ m ≤ n → (n < m ↔ false); (s)%n ≤ m ⊦ (m - n) + m0 ≤ n0 ↔ m + m0 ≤ n0 + n; (s)% ⊦ m + n ≤ m + n0 ↔ n ≤ n0; (s)% ⊦ m ≤ m; (s)% ⊦ ESUCCESS ≠ EIO; (s)% ⊦ ⌊EIO⌋ ; (s)% ⊦ mkpeb(buf, m, boolvar).bad ↔ boolvar; (s)%f: ⊦ m < n → n ≠ 0; (forward) from specification nat-basic%lf-02: ⊦ m < n ∧ m = n0 → n0 < n; (forward) from specification nat-basic%fle-01: ⊦ m ≤ n ∧ n < n0 → m < n0; (forward) from specification nat% ⊦ m < n → n ≠ 0; (s)% ⊦ m + m0 < n → ¬ n + n0 < m; (s) Used formulas: m1 < # pebs ∧ ¬ pebs[m1].bad ∧ m0 + n ≤ PEB_SIZE ∧ n0 + n ≤ # buf ∧ m ≤ UBI_READ_RETRIES + 1 ∧ # buf = # buf` ∧ range=(buf, 0, buf`, 0, n0) ∧ range=(buf, n0 + n, buf`, n0 + n, # buf` - n0 + n) ∧ (err = ESUCCESS ∨ ⌊err⌋ ) ∧ ( err = ESUCCESS → subarray(buf, n0, n) = subarray(pebs[m1].data, m0, n)), UBI_READ_RETRIES + 1 - m = UBI_READ_RETRIES + 1 - m