HOL4P4: Mechanized Small-Step Semantics for P4
Anoud Alshnakat, Didrik Lundberg, Roberto Guanciale, Mads Dam
Abstract
We present the first semantics of the network data plane programming language P4 able to adequately capture all key features of P4 16 , the most recent version of P4, including external functions (externs) and concurrency. These features are intimately related since, in P4, extern invocations are the only points at which one execution thread can affect another. Reflecting P4’s lack of a general-purpose memory and the presence of multithreading the semantics is given in small-step style and eschews the use of a heap. In addition to the P4 language itself, we provide an architectural level semantics, which allows the composition of P4-programmed blocks, models end-to-end packet processing, and can take into account features such as arbitration and packet recirculation. A corresponding type system is provided with attendant progress, preservation, and type-soundness theorems. Semantics, type system, and meta-theory are formalized in the HOL4 theorem prover. From this formalization, we derive a HOL4 executable semantics that supports verified execution of programs with partially symbolic packets able to validate simple end-to-end program properties.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Cited by top-tier papers3
- MatchBox: A Semantic Foundation for Data Plane PortabilityEric Hayden Campbell, Robert Zhang, Divyanshu Saxena, Aditya Akella et al.PLDI 2026
- P4-SpecTec: Integrating a Language Mechanization Framework into the Real-World P4 SpecificationJaehyun Lee, Seokhun Jeong, Sehyuk Ahn, Haechan Kwon et al.OOPSLA 2026
- VeriLucid: A Verification-aware Data-plane Programming LanguageJohn Sonchack, Pamela Zave, Jennifer RexfordSIGCOMM 2026
Related papers
- Dependently-typed data plane programmingMatthias Eichholz, Eric Hayden Campbell, Matthias Krebs, Nate Foster et al.POPL 2022 · 15 citations
- P4Inv: Inferring Packet Invariants for Verification of Stateful P4 ProgramsDelong Zhang, Chong Ye, Fei HeINFOCOM 2024 · 3 citations
- P4BID: information flow control in p4Karuna Grewal, Loris D'Antoni, Justin HsuPLDI 2022 · 5 citations
- When P4 Meets Run-to-completion ArchitectureHao Zheng, Xin Yan, Wenbo Li, Jiaqi Zheng et al.NSDI 2025 · 5 citations
- On Temporal Verification of Stateful P4 ProgramsDelong Zhang, Chong Ye, Fei HeNSDI 2025 · 6 citations
