This is a listing of all goals defined over the current specification. Axioms are marked yellow, proved theorems green and unproved theorems blue. Click on individual names to get more information on the proof.
| Name: | Sequent: | Type: |
|---|---|---|
| is-encoded | ⊦ is-encoded(vtbl, buf) ↔ (∃ buf0, buf1, buf2. buf = buf0 + buf1 + buf2 ∧ is-encoded(# vtbl, buf0) ∧ is-encoded-rec(vtbl, buf1)) | An Axiom |
| is-encoded-base | ⊦ is-encoded-rec(∅, buf) ↔ # buf = 0 | An Axiom |
| is-encoded-rec | vtbl ≠ ∅ ⊦ is-encoded-rec(vtbl, buf) ↔ (∃ v, buf0, buf1, buf2. v ∈ vtbl ∧ buf = buf0 + buf1 + buf2 ∧ is-encoded(v, buf0) ∧ is-encoded(vtbl[v], buf1) ∧ is-encoded-rec(vtbl -- v, buf2)) | An Axiom |
| decode-vtbl | decode_vtbl#(BUF; ; VTBL, ERR) {VTBL := ∅; ERR := ESUCCESS; let N = ?, INDEX = 0, SIZE = ? in {decode_nat#(INDEX, BUF; N, SIZE; ERR); INDEX := INDEX + SIZE; while N ≠ 0 ∧ ERR = ESUCCESS do {/* (decode : invariant (ERR = ESUCCESS ∨ ⌊ERR⌋ ) ∧ ( ERR = ESUCCESS → (∃ vtbl1. VTBL ⊥ vtbl1 ∧ # vtbl1 + # VTBL = N` ∧ # vtbl1 = N ∧ # BUF ≥ ENCODED_NAT_SIZE + N` * (ENCODED_VOLID_SIZE + ENCODED_NAT_SIZE) ∧ INDEX = ENCODED_NAT_SIZE + # VTBL * (ENCODED_VOLID_SIZE + ENCODED_NAT_SIZE) ∧ is-encoded(N`, subarray(BUF, 0, ENCODED_NAT_SIZE)) ∧ is-encoded-rec(VTBL, subarray(BUF, ENCODED_NAT_SIZE, # VTBL * (ENCODED_VOLID_SIZE + ENCODED_NAT_SIZE))) ∧ is-encoded-rec(vtbl1, subarray(BUF, INDEX, # vtbl1 * (ENCODED_VOLID_SIZE + ENCODED_NAT_SIZE))))) wfbound N) */; let VOLID = ?, M = ? in {decode_volid#(INDEX, BUF; VOLID, SIZE; ERR); if ERR = ESUCCESS then {INDEX := INDEX + SIZE; decode_nat#(INDEX, BUF; M, SIZE; ERR); if ERR = ESUCCESS then {INDEX := INDEX + SIZE; VTBL[VOLID] := M}}}; N := N - 1}} } | An Axiom |
| encode-vtbl | encode_vtbl#(; VTBL, BUF; ERR) {ERR := ESUCCESS; let INDEX = 0, SIZE = ? in {encode_nat#(# VTBL, INDEX; BUF, SIZE; ERR); INDEX := INDEX + SIZE; while ERR = ESUCCESS ∧ VTBL ≠ ∅ do {/* (encode : invariant (ERR = ESUCCESS ∨ ⌊ERR⌋ ) ∧ # BUF = # BUF` ∧ ( ERR = ESUCCESS → (∃ buf0, buf1, buf2, vtbl0. BUF = buf0 + buf1 + buf2 ∧ VTBL` = VTBL ∪ vtbl0 ∧ VTBL ⊥ vtbl0 ∧ # buf0 + # buf1 = INDEX ∧ # buf2 ≥ # VTBL * (ENCODED_NAT_SIZE + ENCODED_VOLID_SIZE) ∧ is-encoded(# VTBL`, buf0) ∧ is-encoded-rec(vtbl0, buf1))) wfbound # VTBL) */; choose VOLID with VOLID ∈ VTBL in {encode_volid#(VOLID, INDEX; BUF, SIZE; ERR); if ERR = ESUCCESS then {INDEX := INDEX + SIZE; encode_nat#(VTBL[VOLID], INDEX; BUF, SIZE; ERR); INDEX := INDEX + SIZE}; VTBL := VTBL -- VOLID}}} } | An Axiom |
| decode | is-encoded(vtbl0, buf) ⊦ ⟪decode_vtbl#(buf; ; vtbl, err)⟫ ((err = ESUCCESS ∨ ⌊err⌋ ) ∧ (err = ESUCCESS → vtbl = vtbl0)) | A User Theorem |
| encode | # buf ≥ # vtbl * (ENCODED_NAT_SIZE + ENCODED_VOLID_SIZE) + ENCODED_NAT_SIZE, buf0 = buf, vtbl0 = vtbl ⊦ ⟪encode_vtbl#(; vtbl, buf; err)⟫ ((err = ESUCCESS ∨ ⌊err⌋ ) ∧ # buf = # buf0 ∧ (err = ESUCCESS → is-encoded(vtbl0, buf))) | A User Theorem |
| is-encoded-rec-append | ⊦ is-encoded-rec(vtbl, buf) ∧ ¬ v ∈ vtbl ∧ # buf0 = ENCODED_NAT_SIZE + ENCODED_VOLID_SIZE ∧ is-encoded(v, subarray(buf0, 0, ENCODED_VOLID_SIZE)) ∧ is-encoded(n, subarray(buf0, ENCODED_VOLID_SIZE, ENCODED_NAT_SIZE)) → is-encoded-rec(vtbl[v, n], buf + buf0) | A User Theorem |
| is-encoded-rec-size | ⊦ is-encoded-rec(vtbl, buf) → # buf = # vtbl * (ENCODED_VOLID_SIZE + ENCODED_NAT_SIZE) | A User Theorem |
| is-encoded-rec-unique | ⊦ is-encoded-rec(vtbl0, buf) → (is-encoded-rec(vtbl1, buf) ↔ vtbl0 = vtbl1) | A User Theorem |
| is-encoded-unique | ⊦ is-encoded(vtbl0, buf) → (is-encoded(vtbl1, buf) ↔ vtbl0 = vtbl1) | A User Theorem |