Petr4: formal foundations for p4 data planes
Ryan Doenges, Mina Tahmasbi Arashloo, Santiago Bautista, Alexander Chang, Newton Ni, Samwise Parkinson, Rudy Peterson, Alaia Solko-Breslin, Amanda Xu, Nate Foster
摘要
P4 is a domain-specific language for programming and specifying packet-processing systems. It is based on an elegant design with high-level abstractions like parsers and match-action pipelines that can be compiled to efficient implementations in software or hardware. Unfortunately, like many industrial languages, P4 has developed without a formal foundation. The P4 Language Specification is a 160-page document with a mixture of informal prose, graphical diagrams, and pseudocode. The P4 reference implementation is a complex system, running to over 40KLoC of C++ code. Clearly neither of these artifacts is suitable for formal reasoning.
This paper presents a new framework, called Petr4, that puts P4 on a solid foundation. Petr4 consists of a clean-slate definitional interpreter and a calculus that models the semantics of a core fragment of P4. Throughout the specification, some aspects of program behavior are left up to targets. Our interpreter is parameterized over a target interface which collects all the target-specific behavior in the specification in a single interface.
The specification makes ad-hoc restrictions on the nesting of certain program constructs in order to simplify compilation and avoid the possibility of nonterminating programs. We captured the latter intention in our core calculus by stratifying its type system, rather than imposing unnatural syntactic restrictions, and we proved that all programs in this core calculus terminate.
We have validated the interpreter against a suite of over 750 tests from the P4 reference implementation, exercising our target interface with tests for different targets. We established termination for the core calculus by induction on the stratified type system. While developing Petr4, we reported dozens of bugs in the language specification and the reference implementation, many of which have been fixed.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper10
- Gauntlet: Finding Bugs in Compilers for Programmable Packet ProcessingFabian Ruffy, Tao Wang, Anirudh SivaramanOSDI 2020 · 被引用 34 次
- P4Testgen: An Extensible Test Oracle For P4-16Fabian Ruffy, Jed Liu, Prathima Kotikalapudi, Vojtech Havel 等SIGCOMM 2023 · 被引用 20 次
- Semantics and Scheduling for Machine Knitting CompilersJenny Lin, Vidya Narayanan, Yuka Ikarashi, Jonathan Ragan-Kelley 等SIGGRAPH 2023 · 被引用 16 次
- Dependently-typed data plane programmingMatthias Eichholz, Eric Hayden Campbell, Matthias Krebs, Nate Foster 等POPL 2022 · 被引用 15 次
- P4BID: information flow control in p4Karuna Grewal, Loris D'Antoni, Justin HsuPLDI 2022 · 被引用 5 次
它引用的顶会 Paper3
- Gauntlet: Finding Bugs in Compilers for Programmable Packet ProcessingFabian Ruffy, Tao Wang, Anirudh SivaramanOSDI 2020 · 被引用 34 次
- Executable formal semantics for the POSIX shellMichael Greenberg, Austin J. BlattPOPL 2020 · 被引用 21 次
- Proof-Carrying Network CodeChristian Skalka, John H. Ring, David Darais, Minseok Kwon 等CCS 2019 · 被引用 6 次
相关 Paper
- Composing Dataplane Programs with μP4Hardik Soni, Myriana Rifai, Praveen Kumar, Ryan Doenges 等SIGCOMM 2020 · 被引用 54 次
- Sequence Abstractions for Flexible, Line-Rate Network MonitoringAndrew Johnson, Ryan Beckett, Xiaoqi Chen, Ratul Mahajan 等NSDI 2024 · 被引用 4 次
- P4-SpecTec: Integrating a Language Mechanization Framework into the Real-World P4 SpecificationJaehyun Lee, Seokhun Jeong, Sehyuk Ahn, Haechan Kwon 等OOPSLA 2026
- P4Inv: Inferring Packet Invariants for Verification of Stateful P4 ProgramsDelong Zhang, Chong Ye, Fei HeINFOCOM 2024 · 被引用 3 次
- Hydra: Effective Runtime Network VerificationSundararajan Renganathan, Benny Rubin, Hyojoon Kim, Pier Luigi Ventre 等SIGCOMM 2023 · 被引用 11 次
