An algorithm to detect synchronized events of CSP specifications ⋆ Marisa Llorens, Javier Oliver, Josep Silva, and Salvador Tamarit Universidad Polit´ ecnica de Valencia, Camino de Vera S/N, E-46022 Valencia, Spain {mllorens,fjoliver,jsilva,stamarit}@dsic.upv.es Abstract. Concurrent programs present additional difficulties to the design and implementation of static analyses. The main reason is that the order in which the statements of the programs are executed is non- deterministic. In presence of interference between processes due to shared memory, the non-deterministic order can lead the same program either to non-termination or to a deadlock. However, this non-determinism is limited by synchronizations. Synchronizations impose some restrictions that the execution order must obey, and thus, they can be used to pre- dict the evolution of our concurrent systems. In this paper we propose an algorithm to predict the synchronizations of a concurrent system. This algorithm can be used to improve the performance of many static analyses. Keywords: Concurrent programming, Synchronization analysis, CSP. 1 Introduction It is a great deal to predict all the possible pairs of events that can be executed in parallel in concurrent programs. However, the usefulness of such information is clear because a lot of analyses use it to know the behavior of programs. It could be also used in debugging programs, deadlock analysis, automatic optimization or program slicing. One of the most studied concurrent languages is the Communicating Sequen- tial Processes (CSP) [2]. It is a process algebra which allows the specification of complex systems with multiple interacting processes. The study and transforma- tion of such systems often implies different analyses (e.g., deadlock analysis [4], reliability analysis [3], refinement checking [11], etc.). Recently, MEB and CEB (and closely related) static analyses have been proposed [6, 7, 9] for concurrent languages that allow explicit synchronizations such as CSP. These analyses are based on the Context-sensitive Synchronized Control Flow Graph (CSCFG). The ⋆ This work has been partially supported by the Spanish Ministerio de Ciencia e In- novaci´ on under grant TIN2008-06622-C03-02, by the Generalitat Valenciana under grant GVPRE/2008/001, and by the Universidad Polit´ ecnica de Valencia (Programs PAID-05-08 and PAID-06-08).