[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 26 from proof inv-sync (previous step)

# lpt0 = # avol, # lpt1 = # avol, EB_PAGE_SIZE = n0 + # buf0 % EB_PAGE_SIZE, avol[n] = mapped(buf0), lpt1[n] = mklp(m3, # buf0, lpf, m4), buf = mkbuf(n0), keyset(gch) = gc-heap(lpt1, log0), lpf ≠ LP_FREE, n < # avol, awbuf-inv(avol, buffered(n)), bin-heap-inv(gch, lpt1), buf-ro-rw-mode(false, buffered(n), lpt1, avol), bufs-log-only(buffered(n), log0, lpt1), freelist-cons(lpt1, freelist), is-aligned(# buf0, 2 * NODE_HEADER_SIZE), log-group-block(log0, lpt1), lpt-free-unref(lpt0), lpt-free-unref(lpt1), lpt-leb-size(lpt0), lpt-leb-size(lpt1), lpt-ram-flash(lpt1, lpt0, log0), # buf0 ≤ LEB_SIZE, ¬ is-aligned(# buf0, EB_PAGE_SIZE) ⊦ ⟪persistence_encode_padding_node#(; buf; err); isbuf1 := false; bleb1 := buffered(n); if err = ESUCCESS then {awbuf_write_buf#(# buf, buf, adr, m2, log0, lpt0, ns, bleb1; avol, isbuf1; err); m := EB_PAGE_SIZE - lpt1[bleb1.leb].size % EB_PAGE_SIZE; if err = ESUCCESS then lpt1[bleb1.leb] := mklp(lpt1[bleb1.leb].ref-size, lpt1[bleb1.leb].size + m, lpt1[bleb1.leb].flags, lpt1[bleb1.leb].gcheapidx) else {debug#("persistence: flushing of LEB " + bleb1.leb.toString + " failed"); lpt1[bleb1.leb] := mklp(lpt1[bleb1.leb].ref-size, LEB_SIZE, lpt1[bleb1.leb].flags, lpt1[bleb1.leb].gcheapidx); awbuf_enter_readonly#(adr, m2, log0, avol, lpt0, ns, bleb1; ; isbuf1)}} else {debug#("persistence: could not encode padding node"); awbuf_enter_readonly#(adr, m2, log0, avol, lpt0, ns, bleb1; ; isbuf1)}⟫ ( lpt-free-unref(lpt1) ∧ freelist-cons(lpt1, freelist) ∧ bin-heap-inv(gch, lpt1) ∧ keyset(gch) = gc-heap(lpt1, log0) ∧ bufs-log-only(bleb1, log0, lpt1) ∧ # lpt1 = # avol ∧ log-group-block(log0, lpt1) ∧ buf-ro-rw-mode(isbuf1, bleb1, lpt1, avol) ∧ lpt-leb-size(lpt1) ∧ lpt-ram-flash(lpt1, lpt0, log0) ∧ awbuf-inv(avol, bleb1) ∧ # lpt0 = # avol)

User applied rule insert program lemma

And obtained the following new goals

Rule argument

spec: <toplevel> name: prepost-encode-padding seq: buf0 = buf, is-aligned(# buf, 2 * NODE_HEADER_SIZE), # buf ≥ 2 * NODE_HEADER_SIZE ⊦ ⟪persistence_encode_padding_node#(; buf; err)⟫ ( (err = ESUCCESS ∨ ⌊err⌋ ) ∧ # buf = # buf0 ∧ (err = ESUCCESS → abs-padding(buf))) subst: [buf, err, buf0] → [buf, err, buf] flags: <all paths>

Additional information

Used simplifier rules: flush-padding-space-aligned: ⊦ EB_PAGE_SIZE = n + m % EB_PAGE_SIZE ∧ is-aligned(m, 2 * NODE_HEADER_SIZE) → is-aligned(n, 2 * NODE_HEADER_SIZE);%flush-padding-space-header: ⊦ EB_PAGE_SIZE = n + m % EB_PAGE_SIZE ∧ is-aligned(m, 2 * NODE_HEADER_SIZE) ∧ ¬ is-aligned(m, EB_PAGE_SIZE) → (2 * NODE_HEADER_SIZE ≤ n ↔ n ≠ 0);% ⊦ # mkbuf(n) = n; (s)%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic%c: ⊦ m + n = n + m; from specification nat-basic%mult-a: ⊦ m0 * m * n = (m0 * m) * n; from specification nat-mult%mult-c: ⊦ m * n = n * m; from specification nat-mult% ⊦ n ≥ m ↔ m ≤ n; (s)% ⊦ n + 0 = n; (s)% ⊦ EB_PAGE_SIZE ≠ 0; (s)%n ≠ 0 ⊦ m % n ≠ n; (s)