Acta Polytechnica Hungarica Vol. 16, No. 7, 2019 – 197 – Formal Verification of Python Software Transactional Memory Based on Timed Automata Branislav Kordic, Miroslav Popovic, Silvia Ghilezan University of Novi Sad, Faculty of Technical Sciences Trg Dositeja Obradovica 6, 21000 Novi Sad, Serbia branislav.kordic@rt-rk.uns.ac.rs, miroslav.popovic@rt-rk.uns.ac.rs, gsilvia@uns.ac.rs Abstract: Nowadays Software Transactional Memories (STMs) are used in safety-critical software, such as computational-chemistry simulation programs. To the best of our knowledge, the existing STMs were not developed using rigorous model-driven development process, on the contrary, the majority of proposed STMs are directly implemented in a target programming language and formally verified STMs are proven against more general models. This may result in some key aspects of implementation being omitted or interpreted incorrectly. In this paper, we demonstrate an approach to the formal verification of one particular STM, for the Python language, named Python Software Transactional Memory (PSTM), which is based on a STM design and implementation details. Based on these details, faithful models of a PSTM based system, are developed and verified. The PSTM system components are modeled as timed automata utilizing UPPAAL tool. Finally, it is verified that PSTM satisfies deadlock-freeness, safety, liveness, and reachability properties. Keywords: formal verification; transactional memory; model checking; correctness, timed automata 1 Introduction Transactional Memory (TM) is a programing paradigm [1, 2] which offers an alternative to traditional lock mechanisms based on mutual exclusion by replacing them with lock-free mechanism in order to harvest more performances on multicore architectures. It is considered to be a paradigm that simplifies writing and maintaining parallel programs as well. Due to the lack of hardware support Software Transactional Memory (STM) was born [3]. For a long time, STMs have been a playground for research in this area. Even today, it seems that hardware support is still not a standard feature in commercial architectures.