[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 53 from proof inv-read-gblock-nodes (previous step)

# gndx = # lax, # lpt = # avol, # lpt0 = # avol, LEB_SIZE = n0 + # buf1, avol[m5] = mapped(buf1), m5 < # avol, m < LEB_SIZE, abs-nodes(buf1, gndx, lax, true), awbuf-inv(avol, bleb), buf-ro-rw-mode(isbuf, bleb, lpt0, avol), bufs-log-only(bleb, log0, lpt0), lpt-free-unref(lpt), lpt-leb-size(lpt), lpt-ram-flash(lpt0, lpt, log0), read-gblock-inv(m5, m, ax, gndx0, ax1, gndx2, buf1, false), m + NODE_HEADER_SIZE ≤ LEB_SIZE, # buf1 ≤ LEB_SIZE, ¬ isempty(buf1 + mkempbuf(n0), m, NODE_HEADER_SIZE) ⊦ ⟪decode_header#(m, copy(avol[m5].data + mkempbuf(n0), 0, mkbuf(LEB_SIZE), 0, LEB_SIZE); ndhd; err); m2 := LEB_SIZE; m0 := m; if err ≠ ESUCCESS then debug#("persistence: read_gblock_nodes could not decode header in LEB " + m5.toString + " at offset " + m0.toString) else let m = 2 * NODE_HEADER_SIZE + align↑(ndhd.size, 2 * NODE_HEADER_SIZE) in {if m2 < m0 + m then {debug# ("persistence: read_gblock_nodes ignoring node of size " + m.toString + " at offset " + m0.toString + " in LEB " + m5.toString); err := ENOENT} else if ¬ range= (copy(avol[m5].data + mkempbuf(n0), 0, mkbuf(LEB_SIZE), 0, LEB_SIZE), m0 + NODE_HEADER_SIZE + align↑(ndhd.size, 2 * NODE_HEADER_SIZE), validtrailer, 0, NODE_HEADER_SIZE) then {err := ENOENT; debug#("persistence: read_gblock_nodes partial node at offset " + m0.toString + " in LEB " + m5.toString)} else if ¬ ndhd.ispadding then let gnd = ? in {decode_group_node#(m0, m, copy(avol[m5].data + mkempbuf(n0), 0, mkbuf(LEB_SIZE), 0, LEB_SIZE); gnd; err); if err ≠ ESUCCESS then debug# ("persistence: read_gblock_nodes could not decode node at offset " + m0.toString + " in LEB " + m5.toString) else {gndx0 := gndx0 + gnd '; ax := ax + @(m5, m0, m) '}}; if err = ESUCCESS then m0 := m0 + m}⟫ ( (err = ESUCCESS ∨ err = ENOENT ∨ ⌊err⌋ ) ∧ (err = ESUCCESS ∨ err = ENOENT → read-gblock-inv(m5, m0, ax, gndx0, ax1, gndx2, avol[m5].data, err = ENOENT)) ∧ (err ≠ ESUCCESS ⊃ 0;m2 - m0) < m2 - m)

User applied rule insert program lemma

And obtained the following new goals

Rule argument

spec: encoding-fixed-size-nonempty, inst: encoding-node-header name: decode-contract seq: n + NODE_HEADER_SIZE ≤ # buf ⊦ ⟪decode_header#(n, buf; ndhd; err)⟫ ( (err = ESUCCESS ∨ ⌊err⌋ ) ∧ ( err = ESUCCESS → is-encoded(ndhd, subarray(buf, n, NODE_HEADER_SIZE)))) subst: [buf, n, ndhd, err] → [copy (avol[m5].data + mkempbuf(n0), 0, mkbuf(LEB_SIZE), 0, LEB_SIZE), m, ndhd, err] flags: <all paths>

Additional information

Used simplifier rules: ⊦ mapped(buf).data = buf; (s)% ⊦ #(buf + buf0) = # buf + # buf0; (s)% ⊦ # mkempbuf(n) = n; (s)%append-a: ⊦ (buf + buf0) + buf1 = buf + buf0 + buf1; from specification array-splice[buffer]%c: ⊦ m + n = n + m; from specification nat-basic% ⊦ # mkbuf(n) = n; (s)%# buf = m, # buf0 = m ⊦ copy(buf, 0, buf0, 0, m) = buf; (s)% ⊦ m ≤ n ↔ ¬ n < m; (ss)%f: ⊦ m < n → n ≠ 0; (forward) from specification nat-basic%fle: ⊦ m < n ∧ n ≤ n0 → m < n0; (forward) from specification nat% ⊦ NODE_HEADER_SIZE + n ≠ 0; (s)%a: ⊦ (m + n0) + n1 = m + n0 + n1; 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% ⊦ ¬ n < n; (s)% ⊦ NODE_HEADER_SIZE ≠ 0; (s)%n = # buf0, m ≤ # buf1 ⊦ isempty(buf0 + buf1, n, m) ↔ isempty(buf1, 0, m); (s)%lf: ⊦ m < n ∧ n < n0 → m +1 < n0; (forward) from specification nat-basic%transitivity: ⊦ n < n0 ∧ n0 < n1 → n < n1; (forward) from specification oelem[nat-set]%fle-01: ⊦ m ≤ n ∧ n < n0 → m < n0; (forward) from specification nat