thr2csp: Toward Transforming Threads into Communicating Sequential Processes

As multicore and heterogeneous multiprocessor platforms replace uniprocessor systems, software programs must be designed with a greater emphasis on concurrency. Threading has become the dominant paradigm of concurrent computation in the most popular programming languages. Large threaded programs are known to be difficult to implement correctly, comprehend, and maintain, while concurrent programs written in process algebraic paradigms of concurrency, such as communicating sequential processes, are known to be easier to analyze. This paper presents our initial work on reverse engineering threaded source code and transforming the code into functionally-equivalent message-passing code. The paper also explores future work needed to convert the message-passing code into communicating sequential processes.

[1]  David Binkley,et al.  Extracting Meaning from Abbreviated Identifiers , 2007 .

[2]  George S. Avrunin,et al.  An efficient algorithm for computing MHP information for concurrent Java programs , 1999, ESEC/FSE-7.

[3]  Doug Lea,et al.  Concurrent Programming In Java , 1996 .

[4]  Edward A. Lee The problem with threads , 2006, Computer.

[5]  Andrew William Roscoe,et al.  Model-checking CSP , 1994 .

[6]  George S. Avrunin,et al.  A conservative data flow algorithm for detecting all pairs of statements that may happen in parallel , 1998, SIGSOFT '98/FSE-6.

[7]  Steve A. Schneider,et al.  Concurrent and Real-time Systems: The CSP Approach , 1999 .

[8]  Martin C. Rinard,et al.  Pointer and escape analysis for multithreaded programs , 2001, PPoPP '01.

[9]  C. A. R. Hoare,et al.  A Theory of Communicating Sequential Processes , 1984, JACM.

[10]  Jens Krinke,et al.  Context-sensitive slicing of concurrent programs , 2003, ESEC/FSE-11.

[11]  G. Ramalingam,et al.  Context-sensitive synchronization-sensitive analysis is undecidable , 2000, TOPL.

[12]  Paul Anderson,et al.  Design and Implementation of a Fine-Grained Software Inspection Tool , 2003, IEEE Trans. Software Eng..

[13]  Peter H. Welch,et al.  An Introduction to the Kent C++CSP Library , 2003 .

[14]  C. A. R. Hoare,et al.  Communicating sequential processes , 1978, CACM.

[15]  Andrew William Roscoe,et al.  The Theory and Practice of Concurrency , 1997 .

[16]  Neil Brown,et al.  C++CSP2: A Many-to-Many Threading Model for Multicore Architectures , 2007, CPA.

[17]  Eelco Visser,et al.  Program Transformation with Stratego/XT: Rules, Strategies, Tools, and Systems in Stratego/XT 0.9 , 2003, Domain-Specific Program Generation.

[18]  Christian Hammer,et al.  An Evaluation of Slicing Algorithms for Concurrent Programs , 2007 .

[19]  Mangala Gowri Nanda,et al.  Interprocedural slicing of multithreaded programs with applications to Java , 2006, TOPL.

[20]  David R. Butenhof Programming with POSIX threads , 1993 .

[21]  Jens Krinke,et al.  Advanced slicing of sequential and concurrent programs , 2003, 20th IEEE International Conference on Software Maintenance, 2004. Proceedings..

[22]  Paul Anderson,et al.  Software Inspection Using CodeSurfer , 2001 .