ABSTRACT
Software Transactional Memory (STM) is considered an alternative abstraction for concurrent programming, it has shown to be more approachable when compared to it’s main counterpart, lock-based synchronization. Haskell included language support very early through the STM Haskell library, that allows concurrent lock-free programming using composable atomic actions that manipulate transactional variables. In this work, we explore the correctness criterion Opacity and CO-Opacity for the STM Haskell algorithm using a Graph Transformation System (GTS) approach. Even though Opacity can be demonstrated in Haskell using other STM algorithms, the original STM Haskell library does not satisfy it. Using a GTS to represent the execution of the original STM Haskell, we demonstrate it’s correctness, or lack thereof, using the graph characterization of the criterion. We also compare it to a GTS for the TL2 algorithm, to observe how the algorithms differ in decision making, and how it affects the correctness of the execution.
- Bowen Alpern and Fred B Schneider. 1985. Defining liveness. Information processing letters 21, 4 (1985), 181–185.Google Scholar
- Anshu S Anand, RK Shyamasundar, and Sathya Peri. 2016. Opacity proof for CaPR+ algorithm. In Proceedings of the 17th International Conference on Distributed Computing and Networking. 1–4.Google ScholarDigital Library
- Parwat Singh Anjana, Sweta Kumari, Sathya Peri, Sachin Rathor, and Archit Somani. 2019. An efficient framework for optimistic concurrent execution of smart contracts. In 2019 27th Euromicro International Conference on Parallel, Distributed and Network-Based Processing (PDP). IEEE, 83–92.Google ScholarCross Ref
- Paolo Baldan, Andrea Corradini, Fernando Luís Dotti, Luciana Foss, Fabio Gadducci, and Leila Ribeiro. 2008. Towards a notion of transaction in graph rewriting. Electronic Notes in Theoretical Computer Science 211 (2008), 39–50.Google ScholarDigital Library
- M. Bardohl, R.and Minas, G. Taentzer, and A. Schurr. 1999. Application of graph transformation to visual languages. Handbook of graph grammars and computing by graph transformation 2 (1999), 105.Google Scholar
- Victor Bushkov, Dmytro Dziuma, Panagiota Fatourou, and Rachid Guerraoui. 2013. Snapshot isolation does not scale either. Technical Report. Technical Report TR-437, Foundation of Research and Technology–Hellas (FORTH).Google Scholar
- Diogo J. Cardoso, Luciana Foss, and André R. Du Bois. 2019. A Graph Transformation System formalism for Software Transactional Memory Opacity. In Proceedings of the XXIII Brazilian Symposium on Programming Languages. 3–10.Google ScholarDigital Library
- Diogo J. Cardoso, Luciana Foss, and André R. Du Bois. 2021. A Graph Transformation System formalism for correctness of Transactional Memory algorithms. In 25th Brazilian Symposium on Programming Languages. 49–57.Google ScholarDigital Library
- Diogo J. Cardoso, Luciana Foss, and André R. Du Bois. 2021. A Methodology for Opacity verification for Transactional Memory algorithms using Graph Transformation System. In Anais do VI Workshop-Escola de Informática Teórica. SBC, 9–16.Google Scholar
- Simone André da Costa Cavalheiro, Luciana Foss, and Leila Ribeiro. 2017. Theorem proving graph grammars with attributes and negative application conditions. Theoretical computer science 686 (2017), 25–77.Google Scholar
- Edmund M. Clarke, E Allen Emerson, and A Prasad Sistla. 1986. Automatic verification of finite-state concurrent systems using temporal logic specifications. ACM Transactions on Programming Lang. and Sys. (TOPLAS) 8, 2(1986), 244–263.Google ScholarDigital Library
- Dave Dice, Ori Shalev, and Nir Shavit. 2006. Transactional locking II. In International Symposium on Distributed Computing. Springer, 194–208.Google ScholarDigital Library
- Thomas Dickerson, Paul Gazzillo, Maurice Herlihy, and Eric Koskinen. 2020. Adding concurrency to smart contracts. Distributed Computing 33, 3 (2020), 209–225.Google ScholarDigital Library
- Simon Doherty, Lindsay Groves, Victor Luchangco, and Mark Moir. 2009. Towards formally specifying and verifying transactional memory. Electronic Notes in Theoretical Computer Science 259 (2009), 245–261.Google ScholarDigital Library
- Hartmut Ehrig, Grzegorz Rozenberg, and Hans-J rg Kreowski. 1999. Handbook of graph grammars and computing by graph transformation. Vol. 3. world Scientific.Google Scholar
- EA Emerson and JY Halpern. 1986. On branching versus linear time temporal logic. J. ACM 33, 1 (1986), 151–178.Google ScholarDigital Library
- E Allen Emerson and Edmund M Clarke. 1982. Using branching time temporal logic to synthesize synchronization skeletons. SCP 2, 3 (1982), 241–266.Google ScholarCross Ref
- Amir Hossein Ghamarian, Maarten de Mol, Arend Rensink, Eduardo Zambon, and Maria Zimakova. 2012. Modelling and analysis using GROOVE. International journal on software tools for technology transfer 14, 1(2012), 15–40.Google Scholar
- Rachid Guerraoui and Michal Kapalka. 2007. Opacity: A correctness condition for transactional memory. Technical Report.Google Scholar
- Rachid Guerraoui and Michal Kapalka. 2008. On the correctness of transactional memory. In Proceedings of the 13th ACM SIGPLAN Symposium on Principles and practice of parallel programming. ACM, 175–184.Google ScholarDigital Library
- Rachid Guerraoui and Michał Kapałka. 2010. Principles of transactional memory. Synthesis Lectures on Distributed Computing 1, 1 (2010), 1–193.Google ScholarDigital Library
- Tim Harris, Simon Marlow, Simon Peyton-Jones, and Maurice Herlihy. 2005. Composable memory transactions. In Proceedings of the tenth ACM SIGPLAN symposium on Principles and practice of parallel programming. 48–60.Google ScholarDigital Library
- Reiko Heckel. 2006. Graph transformation in a nutshell. Electronic notes in theoretical computer science 148, 1 (2006), 187–198.Google Scholar
- Maurice Herlihy and J Eliot B Moss. 1993. Transactional memory: Architectural support for lock-free data structures. In Proceedings of the 20th annual international symposium on Computer architecture. 289–300.Google ScholarDigital Library
- Damien Imbs and Michel Raynal. 2012. Virtual world consistency: A condition for STM systems (with a versatile protocol with invisible read operations). Theoretical Computer Science 444 (2012), 113–127.Google ScholarDigital Library
- Priyanka Kumar and Sathya Peri. 2015. Multiversion Conflict Notion for Transactional Memory Systems. arXiv preprint arXiv:1509.04048(2015).Google Scholar
- Priyanka Kumar, Sathya Peri, and K Vidyasankar. 2014. A timestamp based multi-version stm algorithm. In International Conference on Distributed Computing and Networking. Springer, 212–226.Google ScholarDigital Library
- Sweta Kumari and Sathya Peri. 2019. Exploring Progress Guarantees in Multi-Version Software Transactional Memory Systems. Ph. D. Dissertation. Indian Institute of Technology Hyderabad.Google Scholar
- Petr Kuznetsov and Sathya Peri. 2017. Non-interference and local correctness in transactional memory. Theoretical Computer Science 688 (2017), 103–116.Google ScholarCross Ref
- Matthew Le, Ryan Yates, and Matthew Fluet. 2016. Revisiting software transactional memory in Haskell. ACM SIGPLAN Notices 51, 12 (2016), 105–113.Google ScholarDigital Library
- Mohsen Lesani and Jens Palsberg. 2014. Decomposing opacity. In International Symposium on Distributed Computing. Springer, 391–405.Google ScholarCross Ref
- Heiner Litz, David Cheriton, Amin Firoozshahian, Omid Azizi, and John P Stevenson. 2014. SI-TM: Reducing transactional memory abort rates through snapshot isolation. In Proceedings of the 19th international conference on Architectural support for programming languages and operating systems. 383–398.Google ScholarDigital Library
- Nancy A Lynch. 1996. Distributed algorithms. Elsevier.Google ScholarDigital Library
- Christos H Papadimitriou. 1979. The serializability of concurrent database updates. Journal of the ACM (JACM) 26, 4 (1979), 631–653.Google ScholarDigital Library
- Christina Peterson and Damian Dechev. 2017. A transactional correctness tool for abstract data types. ACM Transactions on Architecture and Code Optimization (TACO) 14, 4(2017), 1–24.Google ScholarDigital Library
- Michel Raynal, Gérard Thia-Kime, and Mustaque Ahamad. 1997. From serializable to causal transactions for collaborative applications. In EUROMICRO 97. Proceedings of the 23rd EUROMICRO Conference: New Frontiers of Information Technology (Cat. No. 97TB100167). IEEE, 314–321.Google ScholarCross Ref
- Arend Rensink, Maarten De Mol, and Eduardo Zambon. 2022. GROOVE GRaphs for Object-Oriented VErification (Version 5.8.1). https://groove.cs.utwente.nl/Google Scholar
- David Sabel. 2014. A Haskell-Implementation of STM Haskell with Early Conflict Detection.. In Software Engineering (Workshops). 171–190.Google Scholar
- Nir Shavit and Dan Touitou. 1997. Software transactional memory. Distributed Computing 10, 2 (1997), 99–116.Google ScholarCross Ref
- Gerhard Weikum and Gottfried Vossen. 2001. Transactional information systems: theory, algorithms, and the practice of concurrency control and recovery. Elsevier.Google Scholar
- Jingna Zeng. 2020. Augmenting Transactional Memory with the Future Abstraction. Ph. D. Dissertation. KTH Royal Institute of Technology.Google Scholar
Index Terms
- Exploring Opacity Software Transactional Memory in Haskell through Graph Transformation
Recommendations
Relaxed Concurrency Control in Software Transactional Memory
Some of today's TM systems implement the two-phase-locking (2PL) algorithm which aborts transactions every time a conflict occurs. 2PL is a simple algorithm that provides fast transactional operations. However, it limits concurrency in benchmarks with ...
A Graph Transformation System formalism for Software Transactional Memory Opacity
SBLP '19: Proceedings of the XXIII Brazilian Symposium on Programming LanguagesIn order to check the correctness of Transactional Memory (TM) systems, a formal description of the implementations guarantees is necessary. There are many consistency conditions for TM, one of the most common is opacity. In this paper we present a ...
Comments