[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,

Theorem encode-orphans

persistence_io_encode_orphans#(PAGESIZE, LEBSIZE; ORPHANS, BUF; ERR) {if # ORPHANS * ENCODED_NAT_SIZE > LEBSIZE then ERR := ENOSPC else {ERR := ESUCCESS; BUF := mkbuf(align↑(# ORPHANS * ENCODED_NAT_SIZE, PAGESIZE)); let OFFSET = 0, SIZE = ? in while ERR = ESUCCESS ∧ ORPHANS ≠ ∅ do {/* (prepost-encode-orphans : invariant (ERR = ESUCCESS ∨ ⌊ERR⌋ ) ∧ is-aligned(# BUF, PAGESIZE) ∧ ORPHANS ⊆ ORPHANS` ∧ # BUF ≤ LEBSIZE ∧ ( ERR = ESUCCESS → OFFSET + # ORPHANS * ENCODED_NAT_SIZE ≤ # BUF ∧ is-encoded(ORPHANS` \ ORPHANS, subarray(BUF, 0, OFFSET))) wfbound # ORPHANS) */; choose N with N ∈ ORPHANS in {encode_nat#(N, OFFSET; BUF, SIZE; ERR); OFFSET := OFFSET + ENCODED_NAT_SIZE; ORPHANS := ORPHANS -- N}}} }