Change search
ReferencesLink to record
Permanent link

Direct link
A domain-specific language for protocol stack implementation in embedded systems
Örebro University, School of Science and Technology.
2011 (English)Doctoral thesis, comprehensive summary (Other academic)
Abstract [en]

Embedded network software has become increasingly interesting for both research and business as more and more networked embedded systems emerge. Well-known infrastructure protocol stacks are reimplemented on new embedded hardware and software architectures. New requirements of modern applications and devices require to implement newly designed or revised protocols. However, implementing protocol stacks for embedded systems remains a time-consuming and error-prone task due to the complexity and performancecritical nature of network software. It is even more so when targeting resource constrained embedded systems: implementations have to minimize energy consumption, memory usage etc., while programming efficiency is needed to improve on time-to-market, scalability, maintainability and product evolution. Therefore, it is worth researching on how to make protocol stack implementations for embedded systems both easier and more likely to be correct within the resource limits.

In the work presented in this thesis, we take a language-based approach and aim to facilitate the implementation of protocol stacks while realizing performance demands and being aware of energy consumption and memory usage within the constraints imposed by embedded systems. We give background on DSL implementation techniques, investigate common practices in network protocol development to determine the potential of domain-specifi languages (DSLs) for embedded network software, and propose a domain-specifi embedded language (DSEL), Protege (Protocol Implementation Generator), for declaratively describing overlaid protocol stacks. In Protege, a high-level packet specification is dually compiled into an internal data representation for protocol logic implementation, and packet processing methods which are then integrated into the dataflow framework of a protocol overlay specification. Constructs for finite state machines allow to specify protocol logic in a concise manner, close to the protocol specification style. Protege specifications are compiled to highly portable C code for various architectures.

Four attached scientific papers report our main results in more detail: an embedded implementation of the data description calculus in Haskell, a compilation framework for generating packet processing code with overlays, the domain-specific language Protege in overview (including embedding techniques and runtime system features), and a real-world case study implementing an industrial application protocol.

Place, publisher, year, edition, pages
Örebro: Örebro universitet , 2011. , 63 p.
Series
Örebro Studies in Technology, ISSN 1650-8580 ; 49
National Category
Engineering and Technology Computer Science
Research subject
Computer and Systems Science
Identifiers
URN: urn:nbn:se:oru:diva-15249ISBN: 978-91-7668-795-6OAI: oai:DiVA.org:oru-15249DiVA: diva2:410286
Public defence
2011-06-08, Högskolan i Halmstad, Wigforssalen, Halmstad, 10:15 (English)
Opponent
Supervisors
Note
Dimiter Driankov is the Director of Applied Autonomous Sensor Systems center (AASS), Örebro UniversityAvailable from: 2011-04-13 Created: 2011-04-13 Last updated: 2012-03-23Bibliographically approved
List of papers
1. A library for processing ad hoc data in Haskell: embedding a data description language
Open this publication in new window or tab >>A library for processing ad hoc data in Haskell: embedding a data description language
2008 (English)In: Implementation and application of functional languages   / [ed] Sven-Bodo Scholz, Olaf Chitil, 2008, 174-191 p.Conference paper (Refereed)
Abstract [en]

Ad hoc data formats, i.e. semistructured non-standard dataformats, are pervasive in many domains that need software tools—bioinformatics,demographic surveys, geophysics and network software are justa few. Building tools becomes easier if parsing and other standard inputoutputprocessing can be automated. Modern approaches for dealingwith ad hoc data formats consist of domain specific languages based ontype systems. Compilers for these languages generate data structures andparsing functions in a target programming language in which tools andapplications are then written. We present a monadic library in Haskellthat implements a data description language. Using our library, Haskellprogrammers have access to data description primitives that can be usedfor parsing and that can be integrated with other libraries and applicationprograms without the need of yet another compiler.

Series
, Lecture notes in computer science, 5836
Keyword
Ad hoc Data, Haskell
National Category
Engineering and Technology Computer Science
Research subject
Computer and Systems Science
Identifiers
urn:nbn:se:oru:diva-15277 (URN)10.1007/978-3-642-24452-0_10 (DOI)978-3-642-24451-3 (ISBN)
Conference
20th International Symposium, IFL 2008, Hatfield, UK, September 10-12, 2008
Projects
IPS
Available from: 2009-10-05 Created: 2011-04-15 Last updated: 2012-03-23Bibliographically approved
2. A Domain Specific Approach to Network Software Architecture: Assuring Conformance Between Architecture and Code
Open this publication in new window or tab >>A Domain Specific Approach to Network Software Architecture: Assuring Conformance Between Architecture and Code
2009 (English)In: Fourth International Conference on Digital Telecommunications, 2009. ICDT '09, Piscataway, N.J.: IEEE , 2009, 127-132 p.Conference paper (Refereed)
Abstract [en]

Network software is typically organized according toa layered architecture that is well understood. However, writingcorrect and efficient code that conforms with the architecture stillremains a problem. To overcome this problem we propose to usea domain specific language based approach. The architecturalconstraints are captured in a domain specific notation that can beused as a source for automatic program generation. Conformancewith the architecture is thus assured by construction. Knowledgefrom the domain allows us to generate efficient code. In addition,this approach enforces reuse of both code and designs, one ofthe major concerns in software architecture. In this paper, weillustrate our approach with PADDLE, a tool that generates packetprocessing code from packet descriptions. To describe packets weuse a domain specific language of dependent types that includespacket overlays. From the description we generate C librariesfor packet processing that are easy to integrate with other partsof the code. We include an evaluation of our tool.

Place, publisher, year, edition, pages
Piscataway, N.J.: IEEE, 2009
Keyword
Network Software Architecture
National Category
Telecommunications Engineering and Technology Computer Science
Research subject
Computer and Systems Science
Identifiers
urn:nbn:se:oru:diva-15278 (URN)10.1109/ICDT.2009.4 (DOI)000274805500026 ()2-s2.0-70449602416 (ScopusID)978-0-7695-3695-8 (ISBN)
Note
©2009 IEEE. Personal use of this material is permitted. However, permission to reprint/republish this material for advertising or promotional purposes or for creating new collective works for resale or redistribution to servers or lists, or to reuse any copyrighted component of this work in other works must be obtained from the IEEE.Available from: 2011-04-15 Created: 2011-04-15 Last updated: 2011-04-15Bibliographically approved
3. An embedded language for programming protocol stacks in embedded systems
Open this publication in new window or tab >>An embedded language for programming protocol stacks in embedded systems
2011 (English)In: Proceedings of the 20th ACM SIGPLAN workshop on Partial evaluation and program manipulation: PEPM'11, New York, NY, USA: ACM , 2011, 63-72 p.Conference paper (Refereed)
Abstract [en]

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.

Place, publisher, year, edition, pages
New York, NY, USA: ACM, 2011
Keyword
domain-specific language, embedded compilation, embedded network software
National Category
Engineering and Technology Computer Science
Research subject
Computer and Systems Science
Identifiers
urn:nbn:se:oru:diva-15279 (URN)10.1145/1929501.1929511 (DOI)978-1-4503-0485-6 (ISBN)
Conference
PEPM'11
Available from: 2011-03-17 Created: 2011-04-15 Last updated: 2011-04-18Bibliographically approved
4. A compositional implementation of Modbus in Protege
Open this publication in new window or tab >>A compositional implementation of Modbus in Protege
2011 (English)In: 6th IEEE International Symposium on Industrial Embedded Systems (SIES), 2011, 2011, 123-131 p.Conference paper (Refereed)
Abstract [en]

This is a case study for Protege. The language is used to produce a radically modular implementation of the Modbus [Mod06a] protocol for industrial process controllers. We show that Protege is an excellent tool to produce customized subset implementations, a commonly used technique to reduce software size and complexity in small industrial controller units.

Modbus is one of the most widely used network protocols in industrial automation applications, and a typical example of an industrial protocol with rich functionality, relatively simple data structures, and several communication layer variants in practical use. The original ModbusSerial uses legacy serial communication protocol standards (RS232 or RS485) for communication between Fieldbus-enabled equipments, e.g. micro-controllers and PLCs within an industrial controller network. ModbusTCP is a more recent Modbus variant that oers Modbus messaging services over TCP/IP networks, to connect modern devices like intelligent sensors or advanced PLCs to a Modbus network.

As already described in Sections 4.1 and 4.3, Modbus divides into several specification and implementation documents [Mod06a, Mod06c, Mod06b]. The core functionality of Modbus is given as the Modbus application protocol [Mod06a], which is independent of the underlying communication layer variants and specifes a large number of relatively simple functions to read and manipulate device state. Separate specications for the communication layer [Mod06b, Mod06c] describe how the Modbus application messaging service should inter-operate with the seria

l line or the TCP/IP stack, respectively resulting in either ModbusSerial or ModbusTCP.

Good maintainability, modularity and code reuse are key features for quick time-to-market, and especially attractive properties in the area of industrial protocols, characterised by long-lived standards and ongoing integration work. In our paper, we show the advantages of our compilation-based DSL approach Protege. We exemplify how to systematically decompose industrial protocols like Modbus, and propose a modular Modbus implementation concept which not only separates the communiation layer as in the specification, but also decomposes Modbus application protocol functionality into separate modules. A Modbus protocol implementation can be decomposed into the two underlying communication layer variants and a number of application layer functions. These application layer functionalities can be seen as independent modules of an entire application layer, acting as small sub-protocols of their own and sharing only the common communication infrastructure below. Furthermore, every protocol in the picture splits into a client and a server part, which operate on the same packet layouts as sender and receiver.

The compilation-based Protege approach provides the necessary setting to reflect this multi-level modularity faithfully in the code. By defining each function code as a separate (sub-)protocol of its own, they can be freely combined to custom implementations tailored towards small controller devices with limited functionality. In addition, the compilation-based high-level approach of Protege enables code reuse for the packet processing code. Parsing (receiver) and marshaling code (sender) are generated from the same Protege source code, imported into the client and server modules. And from the separation of runtime system features for Protege, our implementation gains a large degree of platform-independence; Modbus can thus be integrated in various platforms with specialized embedded operating systems.

In total, our case study implementing Modbus demonstrates that Protege increases flexibility in several aspects and thereby considerably reduces implementation cost. New customized Modbus implementations can be produced very quickly using our approach, which makes integration and maintenance much easier and results in drastically reduced time-to-market, a key feature. for success especially in the industrial setting.

National Category
Engineering and Technology Computer Science
Research subject
Computer and Systems Science
Identifiers
urn:nbn:se:oru:diva-15280 (URN)10.1109/SIES.2011.5953654 (DOI)978-1-61284-818-1 (ISBN)
Conference
6th IEEE International Symposium on Industrial Embedded Systems (SIES 2011), June 15th - 17th, 2011, Västerås, Sweden
Available from: 2011-04-15 Created: 2011-04-15 Last updated: 2012-03-23Bibliographically approved

Open Access in DiVA

fulltext(6116 kB)530 downloads
File information
File name FULLTEXT01.pdfFile size 6116 kBChecksum SHA-512
42c85e51ed6fee22b245fdbe4f44e5fbb713eca3388f515323d5b8db29078a4dcc4aaff5512614828323ec2377ccb303a577a645be721dd95053f440abbe7a51
Type fulltextMimetype application/pdf
cover(1574 kB)36 downloads
File information
File name COVER01.pdfFile size 1574 kBChecksum SHA-512
ab4db57b8c9cc3a99e116c2f4204613ca693823d20eaa47e4dc7be748c749a6c863e824cd3270160d76f3b3ca7577f0c86bae4c38c87dbf8e5e98083da2ba497
Type coverMimetype application/pdf
spikblad(145 kB)3 downloads
File information
File name SPIKBLAD01.pdfFile size 145 kBChecksum SHA-512
b13e84ab13247454d3106913b94324ca2fa558d365f9c3f5a68b31fe4c3e298934ce892a3c4887177316d69ab6f4a5eed43651aa9eea083708f666f28da43c27
Type spikbladMimetype application/pdf

Search in DiVA

By author/editor
Wang, Yan
By organisation
School of Science and Technology
Engineering and TechnologyComputer Science

Search outside of DiVA

GoogleGoogle Scholar
Total: 530 downloads
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

Total: 892 hits
ReferencesLink to record
Permanent link

Direct link