[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 14 from proof encode (previous step)

# buf1 = # buf, n0 = n, subarray(buf1, ENCODED_NAT_SIZE, # buf - ENCODED_NAT_SIZE) = subarray(buf, ENCODED_NAT_SIZE, # buf - ENCODED_NAT_SIZE), vtbl0 = vtbl, # vtbl * (ENCODED_NAT_SIZE + ENCODED_VOLID_SIZE) + ENCODED_NAT_SIZE ≤ # buf, ENCODED_NAT_SIZE ≤ # buf, err = ESUCCESS → is-encoded(# vtbl, subarray(buf1, 0, ENCODED_NAT_SIZE)) ∧ n = ENCODED_NAT_SIZE, err = ESUCCESS ∨ ⌊err⌋ ⊦ ⟪while err = ESUCCESS ∧ vtbl ≠ ∅ do {/* (encode : invariant (err = ESUCCESS ∨ ⌊err⌋ ) ∧ # buf1 = # buf1` ∧ ( err = ESUCCESS → (∃ buf0, buf3, buf2, vtbl0. buf1 = buf0 + buf3 + buf2 ∧ vtbl` = vtbl ∪ vtbl0 ∧ vtbl ⊥ vtbl0 ∧ # buf0 + # buf3 = n0 ∧ # buf2 ≥ # vtbl * (ENCODED_NAT_SIZE + ENCODED_VOLID_SIZE) ∧ is-encoded(# vtbl`, buf0) ∧ is-encoded-rec(vtbl0, buf3))) wfbound # vtbl) */; choose v with v ∈ vtbl in {encode_volid#(v, n0; buf1, n; err); if err = ESUCCESS then {n0 := n0 + n; encode_nat#(vtbl[v], n0; buf1, n; err); n0 := n0 + n}; vtbl := vtbl -- v}}⟫ ((err = ESUCCESS ∨ ⌊err⌋ ) ∧ # buf1 = # buf ∧ (err = ESUCCESS → is-encoded(vtbl0, buf1)))

Heuristic annotation applied rule annotation right

And obtained the following new goals

Rule argument

rule: invariant right arg: bound: # vtbl inv: (err = ESUCCESS ∨ ⌊err⌋ ) ∧ # buf1 = # buf1` ∧ ( err = ESUCCESS → (∃ buf0, buf3, buf2, vtbl0. buf1 = buf0 + buf3 + buf2 ∧ vtbl` = vtbl ∪ vtbl0 ∧ vtbl ⊥ vtbl0 ∧ # buf0 + # buf3 = n0 ∧ # buf2 ≥ # vtbl * (ENCODED_NAT_SIZE + ENCODED_VOLID_SIZE) ∧ is-encoded(# vtbl`, buf0) ∧ is-encoded-rec(vtbl0, buf3))) fmapos: right 1 pos: right 1

Additional information

Used formulas: (err = ESUCCESS ∨ ⌊err⌋ ) ∧ # buf1 = # buf1` ∧ ( err = ESUCCESS → (∃ buf0, buf3, buf2, vtbl0. buf1 = buf0 + buf3 + buf2 ∧ vtbl` = vtbl ∪ vtbl0 ∧ vtbl ⊥ vtbl0 ∧ # buf0 + # buf3 = n0 ∧ # buf2 ≥ # vtbl * (ENCODED_NAT_SIZE + ENCODED_VOLID_SIZE) ∧ is-encoded(# vtbl`, buf0) ∧ is-encoded-rec(vtbl0, buf3))), # vtbl = # vtbl