Formal analysis and verification of the PSTM architecture using CSP

Abstract Starting with the analysis of the source codes of the Python Software Transactional Memory (PSTM) architecture, this paper applies process algebra CSP to formally verify the architecture at a fine-grained level. We analyze the communication process and components of the architecture from multiple perspectives and establish models describing the communication behaviors of the PSTM architecture. We use model checker PAT to automatically simulate and verify the established model. After adapting the traditional transactional properties to the PSTM architecture, we analyze and verify five properties for the PSTM architecture, including deadlock freeness, atomicity, isolation, consistency and optimism. The verification results indicate that all the properties are valid. Based on the judgement of the execution logic of the communication procedure in the PSTM architecture, we can conclude that the architecture can have a proper communication and can guarantee atomicity, isolation, consistency and optimism. Besides, we also provide a case study with an application scenario and propose a corollary that the value of the shared counter is equal to the number of parallel processes. We verify whether the case study system can satisfy all the conditions of corollary from both positive and negative perspectives. The results show that the corollary is tenable.

[1]  Jun Sun,et al.  Model Checking CSP Revisited: Introducing a Process Analysis Toolkit , 2008, ISoLA.

[2]  Miroslav Popovic,et al.  An approach to formal verification of python software transactional memory , 2017, ECBS.

[3]  Yue Zhang,et al.  Formalization and Verification of REST on HTTP Using CSP , 2014, TTSS.

[4]  Rachid Guerraoui,et al.  Toward a theory of transactional contention managers , 2005, PODC '05.

[5]  A. El-kustaban,et al.  Formalising of Transactional Memory Using Interval Temporal Logic (ITL) , 2012, 2012 Spring Congress on Engineering and Technology.

[6]  Amir Pnueli,et al.  Verifying Correctness of Transactional Memories , 2007 .

[7]  Jun Sun,et al.  Model checking with fairness assumptions using PAT , 2014, Frontiers of Computer Science.

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

[9]  Rachid Guerraoui,et al.  Model checking transactional memories , 2010, Distributed Computing.

[10]  Branislav Kordic,et al.  PSTM: Python software transactional memory , 2014, 2014 22nd Telecommunications Forum Telfor (TELFOR).

[11]  A. W. Roscoe,et al.  Using CSP to Detect Errors in the TMN Protocol , 1997, IEEE Trans. Software Eng..

[12]  Rupak Majumdar,et al.  Parameterized verification of transactional memories , 2010, PLDI '10.

[13]  Mark Moir,et al.  Towards formally specifying and verifying transactional memory , 2009, Formal Aspects of Computing.

[14]  Xi Wu,et al.  Modeling and Verifying Transaction Scheduling for Software Transactional Memory using CSP , 2019, 2019 International Symposium on Theoretical Aspects of Software Engineering (TASE).

[15]  Jian Huang,et al.  Checking noninterference in Timed CSP , 2012, Formal Aspects of Computing.

[16]  Miroslav Popovic,et al.  Formalization and Verification of the PSTM Architecture , 2017, 2017 24th Asia-Pacific Software Engineering Conference (APSEC).

[17]  Ilija Basicevic,et al.  Transaction scheduling for Software Transactional Memory , 2017, 2017 IEEE 2nd International Conference on Cloud Computing and Big Data Analysis (ICCCBDA).

[18]  Miroslav Popovic,et al.  DPM-PSTM: Dual-Port Memory Based Python Software Transactional Memory , 2015, 2015 4th Eastern European Regional Conference on the Engineering of Computer Based Systems.

[19]  Elena Tsanko,et al.  Verification of transactional memory in POWER8 , 2014, 2014 51st ACM/EDAC/IEEE Design Automation Conference (DAC).

[20]  Erick Fredj,et al.  A new hybrid algorithm for finding the lowest minima of potential surfaces: Approach and application to peptides , 2011, J. Comput. Chem..

[21]  Nir Shavit,et al.  Software transactional memory , 1995, PODC '95.

[22]  Maurice Herlihy,et al.  Transactional Memory: Architectural Support For Lock-free Data Structures , 1993, Proceedings of the 20th Annual International Symposium on Computer Architecture.

[23]  Maurice Herlihy,et al.  The art of multiprocessor programming , 2020, PODC '06.

[24]  James R. Goodman Using cache memory to reduce processor-memory traffic , 1998, ISCA '98.

[25]  Kunle Olukotun,et al.  STAMP: Stanford Transactional Applications for Multi-Processing , 2008, 2008 IEEE International Symposium on Workload Characterization.

[26]  Andreas Reuter,et al.  Transaction Processing: Concepts and Techniques , 1992 .

[27]  Michael Gschwind,et al.  The IBM Blue Gene/Q Compute Chip , 2012, IEEE Micro.

[28]  Parosh Aziz Abdulla,et al.  Verifying safety and liveness for the FlexTM hybrid transactional memory , 2013, 2013 Design, Automation & Test in Europe Conference & Exhibition (DATE).