An embedded language for programming protocol stacks in embedded systems

  • Authors:
  • Yan Wang;Verónica Gaspes

  • Affiliations:
  • Halmstad University, Halmstad, Sweden;Halmstad University, Halmstad, Sweden

  • Venue:
  • Proceedings of the 20th ACM SIGPLAN workshop on Partial evaluation and program manipulation
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

Protocol stack specifications are well-structured documents that follow a number of conventions and notations that have proven very useful for the design and dissemination of communication protocols. Protocol stack implementations on the other hand, are done in low-level languages, using error-prone programming techniques resulting in programs that are difficult to relate to the specifications, difficult to maintain, modify, extend and reuse. To overcome these problems we propose a domain-specific language that provides abstractions close to the notations used in protocol specifications. From descriptions in our language we generate C programs that can be integrated with other systems software. The language provides constructs to describe packet formats, including physical layout, constraints and dependencies. It also provides constructs for state machines and for layering protocols into stacks. Experiments show that the C programs we generate are comparable in performance and binary size to hand-crafted C programs.