This folder contains the proof scripts accompanying the paper "Specifying and Verifying a Real-World Packet Error-Correction System" by Joshua M. Cohen and Andrew W. Appel. See the src folder for information about the underlying C code (both original and modified).
This repo builds under Coq 8.16.1 and depends on MathComp 1.15.0, coq-record-update 0.3.0, and VST 2.11.1. All of these dependencies are part of the Coq Platform, November 2022 release.
To build all of the proof scripts, navigate to the repo root directory and run make
. The Verif_*.v
files are the VST proofs for the core algorithm implementation; they take longer to
build but are not needed for the end-to-end proofs discussed in the paper.
This folder contains the following files:
AssocList.v
- Association lists with unique keysAbstractPacket.v
- Abstract notion of packet with headerEndian.v
- 4- and 16-bit integers, endianness and converting between host and network byte order, convert words to bytes and backIP.v
- IP and UDP data types with headers and length invariants, recover packet structure from byte sequenceCommonFEC.v
- generic results about list operations, nats, absolute value, sublists, and othersBlock.v
- definition of FEC (concrete) packets, Block data structure, predicates on Blocks, convert packet stream to Block stream, subblocksProducer.v
- definition of FEC producer and theorems about its outputConsumerGeneric.v
- generic version of FEC consumer (parametric in choice of timeout mechanism), results about Reed-Solomon decoder on Block, relating Producer and ConsumerConsumerNoTimeouts.v
- FEC Consumer with no timeouts, prove that packets are recovered with bounded lossReorder.v
- Definition of RD (Reorder Density), theorems about reordering and duplicationConsumerTimeouts.v
- FEC Consumer with timeouts (but unbounded integers), show that reorder+duplication bounds give same output as non-timeout versionSeqCmp
- Serial number arithmetic for arbitrary machine-length integersConsumerMachine.v
- FEC Consumer with machine-length integers and serial number arithmeticProducerConsumerCorrectness.v
- Full specs and theorems about Producer and Consumer
- Proof of Property 2 -
all_data_sent
inProducerConsumerCorrectness.v
- Proof of Property 3 -
all_decoded_in
inProducerConsumerCorrectness.v
- Condition 1 -
loss_cond_i
inProducerConsumerCorrectness.v
- RD definition -
ri
anddispl
inReorder.v
- Block definition -
Block
inBlock.v
- Producer definition -
producer_all_steps
inProducer.v
- Consumer definition with no timeouts -
consumer_all_steps_nto
inConsumerNoTimeouts.v
- Consumer definition with timeouts -
consumer_all_steps
inConsumerTimeouts.v
- Consumer definition with machine-length ints -
consumer_all_steps_m
inConsumerMachine.v
- Model 1 recovers all packets -
all_packets_in_block_recovered
inConsumerNoTimeouts.v
- Theorem 1 -
u_seqNum_reorder_bound
inReorder.v
- Theorem 2 -
packets_reorder_dup_bound
inReorder.v
- Models 1 and 2 equivalent -
consumer_timeout_notimeout_all
inConsumerTimeouts.v
- Theorem 3 -
seq_lt_lt
inSeqCmp.v
- Models 2 and 3 equivalent -
consumer_all_steps_m_eq
inConsumerMachine.v
- Theorem 4 -
block_i_recovered
inProducerConsumerCorrectness.v
- Corollary 1 -
orig_decoded_streams
inProducerConsumerCorrectness.v