🤖 AI Summary
This work addresses the problem of verifying behavioral equivalence of packet parsers in the P4 programming language by proposing an efficient method grounded in automata theory and symbolic execution. The approach models P4 parser semantics as finite-state automata and employs bisimulation relations to check equivalence, automatically generating either formal proofs or counterexample bitstreams. For the first time, it enables rapid verification of non-trivial P4 parsers on commodity hardware, completing equivalence checks for complex scenarios within minutes. This represents a significant advance in scalability and practicality, and the method has already been successfully deployed in real-world network environments.
📝 Abstract
P4 is a domain-specific language for programming protocol-independent packet processors, where packet parsers describe how incoming bit-streams are structured into headers and fields. Building on work by Doenges et al. (2022), we present Octopus, a tool that translates P4 packet parsers into automata and then attempts to (symbolically) check their equivalence. Octopus produces evidence, either in the form of a bisimulation demonstrating equivalence, or a counterexample bit-stream witnessing a behavioral difference between the two parsers. In contrast with earlier work, our tool can check equivalence between non-trivial parsers within minutes, on consumer hardware. We report on the tool's implementation and evaluate its usability in networking contexts.