The spread of the Internet and the advanced use of the Internet increase the opportunity of the implementation of communication protocols. A communication protocol generally comprises definitions of message formats and rules for message sequences. Therefore a programmer needs to implement parsing received message, building sending messages, timeout processing, using asynchronous I/O, and so on. Although most of them are routine work, they are complicated, so maintainability of the program gets worse, and they tend to cause bugs besides. In this paper, we describe the Preccs compiler that generates C code from the description of the communication protocol. In Preccs, the message format is described with the extended regular expressions, and the message sequence is described with the notation based on the process calculus. The Preccs compiler automatically generates C code along with these descriptions. Consequently programmers are released for complicated programming work, and they can rapidly develop communication software with high reliability and maintainability.
View full abstract