Towards the automatic synthesis of asynchronous communication mechanisms

The correct transfer of data between concurrent processes is important in the exploitation of parallel architectures within distributed real-time systems. Techniques for solving this problem generally rely on mutual exclusion principles to control access to shared communication resources. The traditional solution involves the use of semaphores to protect write and read operations on a shared memory helping to preserve the data being transmitted. The problem with this approach is that a minimum locking between the asynchronous communicating processes is not guaranteed. This is mainly because the semaphore protects the data access operations. Since these operations may be performed in a register of arbitrary size, this may take a long time to conclude. One way of solving this problem is to design a communication scheme such that the atomic actions of each process occur at a very small granularity level, when accessing binary control variables. An AsynChronous Communication Mechanism (ACM) is a scheme which manages the transfer of data between two processes not necessarily synchronized. The general scheme includes a shared memory and a set of unidirectional control variables. Each control variable is set by one process and read by the other. This schema allows the design of communication protocols in which the processes are fully asynchronous. However, the use of binary control variables turns the implementation of ACMs a slow and prone to errors task. The construction of ACMs is known to be a hard task, and until now it was typically made on an ad-hoc basis using a construct-and-verify approach. This work introduces a technique for the automatic synthesis of ACMs, having as starting point only its functional specification. The result is an ACM implementation that can be used to communicate two asynchronous processes guaranteeing properties such as coherence and freshness. Coherence is related to the mutual exclusion between the communicating processes when accessing the communication buffer. Freshness is related to the fact that a written data must be made available for the reader. Two approaches for the automatic synthesis of ACMs are described. The first one is based on the generation of a state graph specification for the ACM. The state graph model captures the properties of an ACM at the level of interleaving semantics. Then a Petri Net (PN) model is synthesized from the state graph. The method for the synthesis of Petri nets is based on a more general procedure which uses the theory of regions. Finally, the implementation is derived from the PN. In this approach, the PN synthesized preserves coherence and freshness. This is guaranteed by construction. It is possible to generate state graph specifications of considerable size. However, the synthesis of PNs is only possible for ACMs of very small size. This makes the state graph based approach of limited practical use. From the analysis of the state graphs and the few PN models obtained, it was observed that both show a very regula structure. This regularity turned possible the directly generation of the PN models. Using this new approach, it is possible to generate bigger ACMs. The payback comes in the need to model check the PN before synthesizing the implementation. Coherence and freshness, are described as a set of CTl formulae, and model checking is applied over the PN. If the result is positive, the ACM synthesis can proceed. Since the state space of the ACMs grows very fast, this new approach suffers of the state space explosion problem. Then it happens, it is still possible to synthesize the ACM implementation, but it cannot be argued the correctness of coherence and freshness. The synthesis of ACM implementations is discussed for both software and hardware. Although the software is synthesized as C++ source code, the technique is generic enough to be used to obtain source code for any programming language. The hardware is synthesized in the form of Verilog code.

[1]  Rajit Manohar,et al.  SNAP: a Sensor-Network Asynchronous Processor , 2003, Ninth International Symposium on Asynchronous Circuits and Systems, 2003. Proceedings..

[2]  Edsger W. Dijkstra,et al.  Cooperating sequential processes , 2002 .

[3]  Michel Raynal,et al.  Algorithms for mutual exclusion , 1986 .

[4]  Dirk Taubner,et al.  On the Implementation of Petri Nets , 1988, European Workshop on Applications and Theory of Petri Nets.

[5]  Luciano Lavagno,et al.  Deriving Petri Nets for Finite Transition Systems , 1998, IEEE Trans. Computers.

[6]  Leonard R. Marino,et al.  General theory of metastable operation , 1981, IEEE Transactions on Computers.

[7]  A. Cheng,et al.  Model Checking Coloured Petri Nets - Exploiting Strongly Connected Components , 1997 .

[8]  Tadao Murata,et al.  Petri nets: Properties, analysis and applications , 1989, Proc. IEEE.

[9]  James Lyle Peterson,et al.  Petri net theory and the modeling of systems , 1981 .

[10]  Antonio Cantoni,et al.  On the Unavoidability of Metastable Behavior in Digital Systems , 1987, IEEE Transactions on Computers.

[11]  P. S. Thiagarajan,et al.  Message Sequence Charts , 2003, UML for Real.

[12]  Bill Lin,et al.  Software synthesis of process-based concurrent programs , 1998, Proceedings 1998 Design and Automation Conference. 35th DAC. (Cat. No.98CH36175).

[13]  Fei Xia,et al.  Towards Synthesis of Asynchronous Communication Algorithms , 2002 .

[14]  Eric S. Raymond,et al.  The Art of Unix Programming , 2003 .

[15]  Bjarne Stroustrup,et al.  The C++ Programming Language: Special Edition , 2000 .

[16]  G. Rozenberg,et al.  Elementary transition systems , 1990 .

[17]  H. R. Simpson,et al.  Protocols for process interaction , 2003 .

[18]  Fei Xia,et al.  A Compositional Method for the Synthesis of Asynchronous Communication Mechanisms , 2007, ICATPN.

[19]  Amir Pnueli,et al.  The temporal logic of programs , 1977, 18th Annual Symposium on Foundations of Computer Science (sfcs 1977).

[20]  Bernd Grahlmann,et al.  The PEP Tool , 1997, CAV.

[21]  Eby G. Friedman,et al.  System Timing , 2000, The VLSI Handbook.

[22]  Fei Xia,et al.  Algorithms for signal and message asynchronous communication mechanisms and their analysis , 2001, Proceedings Second International Conference on Application of Concurrency to System Design.

[23]  Kenneth L. McMillan,et al.  The SMV System , 1993 .

[24]  Kjeld Høyer Mortensen Automatic Code Generation Method Based on Coloured Petri Net Models Applied on an Access Control System , 2000, ICATPN.

[25]  C. A. R. Hoare,et al.  Monitors: an operating system structuring concept , 1974, CACM.

[26]  Robin Milner,et al.  A Calculus of Communicating Systems , 1980, Lecture Notes in Computer Science.

[27]  Alexandre Yakovlev,et al.  Data Communication in Systems with Heterogeneous Timing , 2002, IEEE Micro.

[28]  Leslie Lamport,et al.  The mutual exclusion problem: part I—a theory of interprocess communication , 1986, JACM.

[29]  Luciano Lavagno,et al.  Synthesis of embedded software using free-choice Petri nets , 1999, DAC '99.

[30]  H. R. Simpson Four-slot fully asynchronous communication mechanism , 1990 .

[31]  H. R. Simpson,et al.  Role model analysis of an asynchronous communication mechanism , 1997 .

[32]  R. Card,et al.  Rapid Ada prototyping: principles and example of a complex application , 1990, Ninth Annual International Phoenix Conference on Computers and Communications. 1990 Conference Proceedings.

[33]  Fei Hao,et al.  Buffered asynchronous communication mechanisms , 2004, Proceedings. Fourth International Conference on Application of Concurrency to System Design, 2004. ACSD 2004..

[34]  Alexandre Yakovlev,et al.  Asynchronous communication mechanisms using self-timed circuits , 2000, Proceedings Sixth International Symposium on Advanced Research in Asynchronous Circuits and Systems (ASYNC 2000) (Cat. No. PR00586).

[35]  Donald E. Thomas,et al.  The Verilog hardware description language (4th ed.) , 1998 .

[36]  Craig A. Knoblock,et al.  Advanced Programming in the UNIX Environment , 1992, Addison-Wesley professional computing series.

[37]  H. R. Simpson Correctness analysis for class of asynchronous communication mechanisms , 1992 .

[38]  Michael Westergaard,et al.  CPN Tools for Editing, Simulating, and Analysing Coloured Petri Nets , 2003, ICATPN.

[39]  Alexandre Yakovlev,et al.  Synthesis and implementation of a signal-type asynchronous data communication mechanism , 2001, Proceedings Seventh International Symposium on Asynchronous Circuits and Systems. ASYNC 2001.

[40]  Maurice J. Bach The Design of the UNIX Operating System , 1986 .