Skip to main content

Linear Types for Packet Processing

  • Conference paper

Part of the Lecture Notes in Computer Science book series (LNCS,volume 2986)

Abstract

We present PacLang: an imperative, concurrent, linearly-typed language designed for expressing packet processing applications. PacLang’s linear type system ensures that no packet is referenced by more than one thread, but allows multiple references to a packet within a thread. We argue (i) that this property greatly simplifies compilation of high-level programs to the distributed memory architectures of modern Network Processors; and (ii) that PacLang’s type system captures that style in which imperative packet processing programs are already written. Claim (ii) is justified by means of a case-study: we describe a PacLang implementation of the IPv4 unicast packet forwarding algorithm.

PacLang is formalised by means of an operational semantics and a Unique Ownership theorem formalises its correctness with respect to the type system.

Keywords

  • Operational Semantic
  • Memory Bank
  • Network Packet
  • Ownership Type
  • Linear Type

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

References

  1. Allen, J., et al.: PowerNP network processor: Hardware, software and applications. IBM Journal of research and development 47, 177–194 (2003)

    CrossRef  Google Scholar 

  2. Berry, G., Boudol, G.: The chemical abstract machine. Theoretical Computer Science 96, 217–248 (1992)

    MATH  CrossRef  MathSciNet  Google Scholar 

  3. Boyapati, C., Lee, R., Rinard, M.: Ownership types for safe programming: Preventing data races and deadlocks. In: Proceedings of the 17th Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 2002), November 2002. ACM Press, New York (2002)

    Google Scholar 

  4. Clarke, D., Wrigstad, T.: External uniqueness is unique enough. In: Cardelli, L. (ed.) ECOOP 2003. LNCS, vol. 2743. Springer, Heidelberg (2003)

    Google Scholar 

  5. Clarke, D.G., Potter, J.M., Noble, J.: Ownership types for flexible alias protection. In: Proceedings of the 13th Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 1998), New York. ACM SIGPLAN Notices, vol. 33(10), pp. 48–64. ACM Press, New York (1998)

    CrossRef  Google Scholar 

  6. Ennals, R., Sharp, R., Mycroft, A.: Linear types for packet processing (extended version). Tech. Rep. UCAM-CL-TR-578, University of Cambridge Computer Laboratory (2004)

    Google Scholar 

  7. Flanagan, C., Sabry, A., Duba, B.F., Felleisen, M.: The essence of compiling with continuations. In: Proceedings ACM SIGPLAN 1993 Conf. on Programming Language Design and Implementation, PLDI 1993, Albuquerque, NM, USA, June 23-25, vol. 28(6), pp. 237–247. ACM Press, New York (1993)

    CrossRef  Google Scholar 

  8. Hilt High Level Software Tools B.V. Concurrent clean language report, Available from: ftp://ftp.cs.kun.nl/pub/Clean/Clean20/doc/CleanRep2.0.pdf

  9. Intel Corporation. Intel IXDP2400 & IXDP2800 advanced development platforms product brief, Available from: http://www.intel.com/design/network/prodbrf/ixdp2x00.htm

  10. Intel Corporation. Intel IXP2400 Network Processor: Flexible, highperformance solution for access and edge applications, Available from: http://www.intel.com/design/network/papers/ixp2400.htm

  11. Johnson, E.J., Kunze, A.: IXP-1200 Programming: The Microengine Coding Guide for the Intel IXP1200 Network Processor Family. Intel Press (2002)

    Google Scholar 

  12. Kobayashi, N.: Quasi-linear types. In: Conference Record of POPL 1999: The 26th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, San Antonio, Texas, New York, NY, pp. 29–42 (1999)

    Google Scholar 

  13. Postel, J.I.: Internet Protocol RFC 791. Internet Engineering Task Force (September 1981), Available from: http://www.ietf.org/rfc.html

  14. Postel, J.: Internet Control Message Protocol, RFC 792. Internet Engineering Task Force (September 1981), Available from: http://www.ietf.org/rfc.html

  15. Stroustrup, B.: The C++ programming language, 3rd edn. Addison- Wesley, Reading

    Google Scholar 

  16. Turner, D.N., Wadler, P., Mossin, C.: Once upon a type. In: Functional Programming Languages and Computer Architecture. ACM Press, New York (1995)

    Google Scholar 

  17. Yavatkar, R., Vin, H. (eds.): IEEE Network Magasine. Special issue on Network Processors: Architecture, Tools, and Applications, 17, 4 (July 2003)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and Permissions

Copyright information

© 2004 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Ennals, R., Sharp, R., Mycroft, A. (2004). Linear Types for Packet Processing. In: Schmidt, D. (eds) Programming Languages and Systems. ESOP 2004. Lecture Notes in Computer Science, vol 2986. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-24725-8_15

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-24725-8_15

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-21313-0

  • Online ISBN: 978-3-540-24725-8

  • eBook Packages: Springer Book Archive