Peregrine: A Language-Agnostic Packet Processing Intermediate Representation with Formal Guarantees
Sean Rhee, Xiangyu Gao, Srinivas Narayana, Nate Foster, Joseph Tassarotti, Anirudh Sivaraman
Key points
From the paper's conclusion- We designed Peregrine to provide formal guarantees from the beginning, rather than adding them in a later step.
Abstract
Many different programmable network devices and domain-specific languages (DSLs) for programming them have been developed in recent years. However, the affiliated compiler infrastructure for each DSL has not kept up, leading to unreliable compilation results and ultimately a poor experience for developers. In response to this fragmented ecosystem, we propose an intermediate representation, Peregrine, to consolidate the common compiler functionalities within this domain into a shared, open-source infrastructure. We designed Peregrine to provide formal guarantees from the beginning, rather than adding them in a later step. The language comes with a formal semantics, along with an equivalence checker written and proven correct in Rocq. Experimental results show that Peregrine is general enough to express multiple applications written in various state-of-the-art network programming languages. The equivalence checker designed in Peregrine can be used for validating the correctness of a range of untrusted compiler passes, as well as for other surprising use cases such as certifying the correctness of packet classification algorithms within a reasonable amount of time.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- P4-SpecTec: Integrating a Language Mechanization Framework into the Real-World P4 SpecificationProceedings of the ACM on Programming Languages · 2026
- Formalizing the Linux eBPF Core ISA: A Mechanized Operational Semantics and Its Real-World ApplicationsProceedings of the ACM on Programming Languages · 2026
- Weighted NetKAT: A Programming Language for Quantitative Network VerificationProceedings of the ACM on Programming Languages · 2026
- Access Control as Verified Parse ConstraintsarXiv · 2026
- Axiom: a logic programming language to express and enforce network designsarXiv · 2026
- Compiling Imperative Hardware Protocol Specifications to HardwarearXiv · 2026