Abstract
High-level programming languages play a key role in a growing number of networking platforms, streamlining application development and enabling precise formal reasoning about network behavior. Unfortunately, current compilers only handle "local" programs that specify behavior in terms of hop-by-hop forwarding behavior, or modest extensions such as simple paths. To encode richer "global" behaviors, programmers must add extra state -- something that is tricky to get right and makes programs harder to write and maintain. Making matters worse, existing compilers can take tens of minutes to generate the forwarding state for the network, even on relatively small inputs. This forces programmers to waste time working around performance issues or even revert to using hardware-level APIs. This paper presents a new compiler for the NetKAT language that handles rich features including regular paths and virtual networks, and yet is several orders of magnitude faster than previous compilers. The compiler uses symbolic automata to calculate the extra state needed to implement "global" programs, and an intermediate representation based on binary decision diagrams to dramatically improve performance. We describe the design and implementation of three essential compiler stages: from virtual programs (which specify behavior in terms of virtual topologies) to global programs (which specify network-wide behavior in terms of physical topologies), from global programs to local programs (which specify behavior in terms of single-switch behavior), and from local programs to hardware-level forwarding tables. We present results from experiments on real-world benchmarks that quantify performance in terms of compilation time and forwarding table size.
- S. B. Akers. Binary decision diagrams. IEEE Trans. Comput., 27(6):509–516, June 1978. Google Scholar
Digital Library
- Mohammad Al-Fares, Alex Loukissas, and Amin Vahdat. A scalable, commodity, data center network architecture. In SIGCOMM, 2008. Google Scholar
Digital Library
- Ali Al-Shabibi, Marc De Leenheer, Matteo Gerola, Ayaka Koshibe, Guru Parulkar, Elio Salvadori, and Bill Snow. OpenVirteX: Make your virtual SDNs programmable. In HotSDN, 2014. Google Scholar
Digital Library
- Carolyn Jane Anderson, Nate Foster, Arjun Guha, Jean-Baptiste Jeannin, Dexter Kozen, Cole Schlesinger, and David Walker. NetKAT: Semantic foundations for networks. In POPL, 2014. Google Scholar
Digital Library
- Valentin Antimirov. Partial derivatives of regular expressions and finite automaton constructions. Theoretical Computer Science, 155(2):291–319, 1996. Google Scholar
Digital Library
- Randal E. Bryant. Graph-based algorithms for boolean function manipulation. IEEE Trans. Comput., 35(8):677–691, August 1986. Google Scholar
Digital Library
- Martin Casado, Teemu Koponen, Rajiv Ramanathan, and Scott Shenker. Virtualizing the network forwarding plane. In PRESTO, 2010. Google Scholar
Digital Library
- Andrew D. Ferguson, Arjun Guha, Chen Liang, Rodrigo Fonseca, and Shriram Krishnamurthi. Hierarchical policies for software defined networks. In HotSDN, 2012. Google Scholar
Digital Library
- Andrew D. Ferguson, Arjun Guha, Chen Liang, Rodrigo Fonseca, and Shriram Krishnamurthi. Participatory networking: An api for application control of sdns. In SIGCOMM, 2013. Google Scholar
Digital Library
- Nate Foster, Rob Harrison, Michael J. Freedman, Christopher Monsanto, Jennifer Rexford, Alec Story, and David Walker. Frenetic: A Network Programming Language. In ICFP, 2011. Google Scholar
Digital Library
- Nate Foster, Dexter Kozen, Matthew Milano, Alexandra Silva, and Laure Thompson. A coalgebraic decision procedure for NetKAT. In POPL, 2015. Google Scholar
Digital Library
- Arjun Guha, Mark Reitblatt, and Nate Foster. Machine-verified network controllers. In PLDI, 2013. Google Scholar
Digital Library
- Arpit Gupta, Laurent Vanbever, Muhammad Shahbaz, Sean Donovan, Brandon Schlinker, Nick Feamster, Jennifer Rexford, Scott Shenker, Russ Clark, and Ethan Katz-Bassett. SDX: A software defined internet exchange. In SIGCOMM, 2014. Google Scholar
Digital Library
- Stephen Gutz, Alec Story, Cole Schlesinger, and Nate Foster. Splendid isolation: A slice abstraction for software-defined networks. In HotSDN, 2012. Google Scholar
Digital Library
- Xin Jin, Jennifer Gossels, Jennifer Rexford, and David Walker. Co-Visor: A compositional hypervisor for software-defined networks. In NSDI, 2015. Google Scholar
Digital Library
- Lavanya Jose, Lisa Yan, George Varghese, and Nick McKeown. Compiling packet programs to reconfigurable switches. In NSDI, 2015. Google Scholar
Digital Library
- Ahmed Khurshid, Xuan Zou, Wenxuan Zhou, Matthew Caesar, and P. Brighten Godfrey. Veriflow: Verifying network-wide invariants in real time. In NSDI, 2013. Google Scholar
Digital Library
- Simon Knight, Hung X. Nguyen, Nickolas Falkner, Rhys Bowden, and Matthew Roughan. The internet topology zoo. IEEE Journal on Selected Areas in Communications, 2011.Google Scholar
Cross Ref
- Teemu Koponen, Keith Amidon, Peter Balland, Mart´ın Casado, Anupam Chanda, Bryan Fulton, Jesse Gross Igor Ganichev, Natasha Gude, Paul Ingram, Ethan Jackson, Andrew Lambeth, Romain Lenglet, Shih-Hao Li, Amar Padmanabhan, Justin Pettit, Ben Pfaff, Rajiv Ramanathan, Scott Shenker, Alan Shieh, Jeremy Stribling, Pankaj Thakkar, Dan Wendlandt, Alexander Yip, and Ronghua Zhang. Network virtualization in multi-tenant datacenters. In NSDI, 2014. Google Scholar
Digital Library
- Dexter Kozen. Kleene algebra with tests. Transactions on Programming Languages and Systems, 19(3):427–443, May 1997. Google Scholar
Digital Library
- Alex X. Liu, Fei Chen, JeeHyun Hwang, and Tao Xie. XEngine: A fast and scalable XACML policy evaluation engine. In International Conference on Measurement and Modeling of Computer Systems (SIGMETRICS), 2008. Google Scholar
Digital Library
- Alex X. Liu, Chad R. Meiners, and Eric Torng. TCAM Razor: A systematic approach towards minimizing packet classifiers in TCAMs. TON, 18(2):490–500, April 2010. Google Scholar
Digital Library
- Nick McKeown, Tom Anderson, Hari Balakrishnan, Guru Parulkar, Larry Peterson, Jennifer Rexford, Scott Shenker, and Jonathan Turner. OpenFlow: Enabling innovation in campus networks. SIGCOMM CCR, 38(2):69–74, 2008. Google Scholar
Digital Library
- Christopher Monsanto, Nate Foster, Rob Harrison, and David Walker. A compiler and run-time system for network programming languages. In POPL, 2012. Google Scholar
Digital Library
- Christopher Monsanto, Joshua Reich, Nate Foster, Jennifer Rexford, and David Walker. Composing software-defined networks. In NSDI, 2013. Google Scholar
Digital Library
- Tim Nelson, Andrew D. Ferguson, Michael J. G. Scheer, and Shriram Krishnamurthi. Tierless programming and reasoning for softwaredefined networks. In NSDI, 2014. Google Scholar
Digital Library
- Damien Pous. Symbolic algorithms for language equivalence and Kleene Algebra with Tests. In POPL, 2015. Google Scholar
Digital Library
- ONOS Project. Intent framework, November 2014. Available at http://onos.wpengine.com/wp-content/uploads/2014/11/ ONOS-Intent-Framework.pdf.Google Scholar
- Open Daylight Project. Group policy, January 2014. Available at https://wiki.opendaylight.org/view/Group_Policy:Main.Google Scholar
- Cole Schlesinger, Michael Greenberg, and David Walker. Concurrent netcore: From policies to pipelines. In ICFP, 2014. Google Scholar
Digital Library
- O. Tange. GNU parallel - the command-line power tool. ;login: The USENIX Magazine, 36(1):42–47, Feb 2011.Google Scholar
- David E. Taylor and Jonathan S. Turner. ClassBench: A packet classification benchmark. TON, 15:499–511, June 2007. Google Scholar
Digital Library
- Andreas Voellmy, Junchang Wang, Y. Richard Yang, Bryan Ford, and Paul Hudak. Maple: Simplifying SDN programming using algorithmic policies. In SIGCOMM, 2013. Google Scholar
Digital Library
Index Terms
A fast compiler for NetKAT
Recommendations
A fast compiler for NetKAT
ICFP 2015: Proceedings of the 20th ACM SIGPLAN International Conference on Functional ProgrammingHigh-level programming languages play a key role in a growing number of networking platforms, streamlining application development and enabling precise formal reasoning about network behavior. Unfortunately, current compilers only handle "local" ...
NetKAT: semantic foundations for networks
POPL '14: Proceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming LanguagesRecent years have seen growing interest in high-level languages for programming networks. But the design of these languages has been largely ad hoc, driven more by the needs of applications and the capabilities of network hardware than by foundational ...
NetKAT: semantic foundations for networks
POPL '14Recent years have seen growing interest in high-level languages for programming networks. But the design of these languages has been largely ad hoc, driven more by the needs of applications and the capabilities of network hardware than by foundational ...






Comments