Isolation Of Processes In PyCSP – Københavns Universitet

Isolation Of Processes In PyCSP

Masters defence by Troels V. Thrane


Programming using the principles of Communicating Sequential Processes (CSP) is gaining popularity. Several libraries for different programming languages have been developed to support the principles of CSP. These include JCSP for Java, C++CSP2 for C++ and PyCSP for Python. As these languages are not designed to fit the principles of CSP, the libraries does not make a perfect fit. In CSP every process can only interact with other processes via message passing. JCSP,
C++CSP2 and PyCSP all allow processes to interact via other means,
such as shared variables. This can lead to programs which does not obey the laws of CSP which can cause bugs in the program and makes it impossible to prove the correctness of the program using CSP.
To avoid this problem, the process-isolation issues are investigated and the problem areas are identified. PyCSP is chosen as the language to rectify these problems in. Different solutions to the isolation issues are discussed and the chosen solutions are implemented to create an isolated PyCSP version. The performance of the modified PyCSP is compared to the standard PyCSP, which show that the isolated PyCSP version causes some overhead, but it can be used as tool for testing the correctness of a network.
Additionally the concepts of mobility of the π-calculus are intro- duced. The π-calculus is another calculus for describing concurrent systems. The mobility concepts from the π-calculus allows for dy- namic networks that reconfigure themselves at runtime. Some of the concepts of the π-calculus are discussed and implemented in PyCSP.