Skip to main content

From model to implementation: a network algorithm programming language


Software-defined networking (SDN) is a revolutionary technology that facilitates network management and enables programmatically efficient network configuration, thereby improving network performance and flexibility. However, as the application programming interfaces (APIs) of SDN are low-level or functionality-restricted, SDN programmers cannot easily keep pace with the ever-changing devices, topologies, and demands of SDN. By deriving motivation from industry practice, we define a novel network algorithm programming language (NAPL) that enhances the SDN framework with a rapid programming flow from topology-based network models to C++ implementations, thus bridging the gap between the limited capability of existing SDN APIs and the reality of practical network management. In contrast to several state-of-the-art languages, NAPL provides a range of critical high-level network programming features: (1) topology-based network modeling and visualization; (2) fast abstraction and expansion of network devices and constraints; (3) a declarative paradigm for the fast design of forwarding policies; (4) a built-in library for complex algorithm implementation; (5) full compatibility with C++ programming; and (6) user-friendly debugging support when compiling NAPL into highly readable C++ codes. The expressiveness and performance of NAPL are demonstrated in various industrial scenarios originating from practical network management.

This is a preview of subscription content, access via your institution.


  1. McKeown N. Software-defined networking. In: Proceedings of Keynote Talk at the 28th Conference on Computer Communications, Valencia, 2009

  2. McKeown N, Anderson T, Balakrishnan H, et al. Openflow: enabling innovation in campus networks. SIGCOMM Comput Commun Rev, 2008, 38: 69–74

    Article  Google Scholar 

  3. Kreutz D, Ramos F M V, Verissimo P E, et al. Software-defined networking: a comprehensive survey. Proc IEEE, 2015, 103: 14–76

    Article  Google Scholar 

  4. Nunes B A A, Mendonca M, Nguyen X N, et al. A survey of software-defined networking: past, present, and future of programmable networks. IEEE Commun Surv Tut, 2014, 16: 1617–1634

    Article  Google Scholar 

  5. Hakiri A, Gokhale A, Berthou P, et al. Software-defined networking: challenges and research opportunities for future Internet. Comput Netw, 2014, 75: 453–471

    Article  Google Scholar 

  6. Monsanto C, Foster N, Harrison R, et al. A compiler and run-time system for network programming languages. In: Proceedings of the 39th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Philadelphia, 2012. 217–230

  7. Foster N, Harrison R, Freedman M J, et al. Frenetic: a network programming language. In: Proceeding of the 16th ACM SIGPLAN International Conference on Functional Programming, Tokyo, 2011. 279–291

  8. Monsanto C, Reich J, Foster N, et al. Composing software-defined networks. In: Proceedings of the 10th USENIX Conference on Networked Systems Design and Implementation, Lombard, 2013

  9. Katta N P, Rexford J, Walker D. Logic programming for software-defined networks. In: Proceeding of Workshop Cross Model Design Validation, Copenhagen, 2012

  10. Soule R, Basu S, Kleinberg R, et al. Managing the network with Merlin. In: Proceeding of the 12th ACM Workshop on Hot Topics in Networks, College Park, 2013

  11. Hunt J. Inheritance considered harmful! In: Guide to the Unified Process featuring UML, Java and Design Patterns. Berlin: Springer, 2003

    Google Scholar 

  12. Ziegelmann M. Constrained Shortest Paths and Related Problems — Constrained Network Optimization. Saarbrücken: VDM Verlag, 2007

    Google Scholar 

  13. Anderson C J, Foster N, Guha A, et al. Netkat: semantic foundations for networks. SIGPLAN Not, 2014, 49: 113–126

    Article  Google Scholar 

  14. Voellmy A, Hudak P. Nettle: taking the sting out of programming network routers. In: Proceedings of the 13th International Conference on Practical Aspects of Declarative Languages, Austin, 2011. 235–249

  15. Nelson T, Guha A, Dougherty D J, et al. A balance of power: expressive, analyzable controller programming. In: Proceedings of the 2nd ACM SIGCOMM Workshop on Hot Topics in Software Defined Networking, Hong Kong, 2013. 79–84

  16. Voellmy A, Wang J, Yang Y R, et al. Maple: simplifying SDN programming using algorithmic policies. In: Proceedings of ACM SIGCOMM 2013 Conference, Hong Kong, 2013. 87–98

  17. Bosshart P, Varghese G, Walker D, et al. P4: programming protocol-independent packet processors. SIGCOMM Comput Commun Rev, 2014, 44: 87–95

    Article  Google Scholar 

  18. Gude N, Koponen T, Pettit J, et al. NOX: towards an operating system for networks. SIGCOMM Comput Commun Rev, 2008, 38: 105–110

    Article  Google Scholar 

  19. Hinrichs T L, Gude N, Casado M, et al. Practical declarative network management. In: Proceedings of the 1st ACM SIGCOMM Workshop on Research on Enterprise Networking, New York, 2009

  20. Huang S S, Green T J, Loo B T. Datalog and emerging applications: an interactive tutorial. In: Proceedings of ACM SIGMOD International Conference on Management of Data, Athens, 2011. 1213–1216

  21. Gansner E R, North S C. An open graph visualization system and its applications to software engineering. Softw-Pract Exper, 2000, 30: 1203–1233

    Article  Google Scholar 

  22. Levine J R, Mason T, Brown D. Lex & Yacc. 2nd ed. Sebastopol: O’Reilly, 1992

    Google Scholar 

Download references


This work was supported partly by Huawei (Grant No. YBN2016030056). Jian WANG, Jie AN, Mingshuai CHEN, and Naijun ZHAN were supported partly by National Natural Science Foundation of China (NSFC) (Grant Nos. 61625206, 61732001). Jie AN and Miaomiao ZHANG were supported partly by National Natural Science Foundation of China (NSFC) (Grant No. 61472279). The authors would like to thank the anonymous reviewers for their insightful comments and suggestions raised in the reviewing process.

Author information

Authors and Affiliations


Corresponding author

Correspondence to Ting Gan.

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Wang, J., An, J., Chen, M. et al. From model to implementation: a network algorithm programming language. Sci. China Inf. Sci. 63, 172102 (2020).

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • DOI:


  • software-defined networking (SDN)
  • network algorithm programming language (NAPL)
  • network abstraction