skip to main content
research-article
Open access

A Transactional Correctness Tool for Abstract Data Types

Published: 14 November 2017 Publication History

Abstract

Transactional memory simplifies multiprocessor programming by providing the guarantee that a sequential block of code in the form of a transaction will exhibit atomicity and isolation. Transactional data structures offer the same guarantee to concurrent data structures by enabling the atomic execution of a composition of operations. The concurrency control of transactional memory systems preserves atomicity and isolation by detecting read/write conflicts among multiple concurrent transactions. State-of-the-art transactional data structures improve on this concurrency control protocol by providing explicit transaction-level synchronization for only non-commutative operations. Since read/write conflicts are handled by thread-level concurrency control, the correctness of transactional data structures cannot be evaluated according to the read/write histories. This presents a challenge for existing correctness verification techniques for transactional memory, because correctness is determined according to the transitions taken by the transactions in the presence of read/write conflicts.
In this article, we present Transactional Correctness tool for Abstract Data Types (TxC-ADT), the first tool that can check the correctness of transactional data structures. TxC-ADT elevates the standard definitions of transactional correctness to be in terms of an abstract data type, an essential aspect for checking correctness of transactions that synchronize only for high-level semantic conflicts. To accommodate a diverse assortment of transactional correctness conditions, we present a technique for defining correctness as a happens-before relation. Defining a correctness condition in this manner enables an automated approach in which correctness is evaluated by generating and analyzing a transactional happens-before graph during model checking. A transactional happens-before graph is maintained on a per-thread basis, making our approach applicable to transactional correctness conditions that do not enforce a total order on a transactional execution. We demonstrate the practical applications of TxC-ADT by checking Lock Free Transactional Transformation and Transactional Data Structure Libraries for serializability, strict serializability, opacity, and causal consistency.

Supplementary Material

TACO1404-37 (taco1404-37.pdf)
Slide deck associated with this paper

References

[1]
Peter Alvaro, Peter Bailis, Neil Conway, and Joseph M. Hellerstein. 2013. Consistency without borders. In Proceedings of the 4th Annual Symposium on Cloud Computing. ACM, 23.
[2]
Woongki Baek, Nathan Bronson, Christos Kozyrakis, and Kunle Olukotun. 2010. Implementing and evaluating a model checker for transactional memory systems. In Proceedings of the 15th IEEE International Conference on Engineering of Complex Computer Systems (ICECCS’10). IEEE, 117--126.
[3]
Annette Bieniusa and Peter Thiemann. 2011. Proving isolation properties for software transactional memory. In European Symposium on Programming. Springer, 38--56.
[4]
Colin Blundell, E. Christopher Lewis, and Milo M. K. Martin. 2006. Subtleties of transactional memory atomicity semantics. IEEE Comput. Arch. Lett. 5, 2 (2006).
[5]
Sebastian Burckhardt, Chris Dern, Madanlal Musuvathi, and Roy Tan. 2010. Line-up: A complete and automatic linearizability checker. In Proceedings of the 31st ACM SIGPLAN Conference on Programming Language Design and Implementation 2010 (PLDI’10), Vol. 45. ACM, 330--340.
[6]
Ariel Cohen, John W. O’Leary, Amir Pnueli, Mark R. Tuttle, and Lenore D. Zuck. 2007. Verifying correctness of transactional memories. In Formal Methods in Computer Aided Design 2007 (FMCAD’07). IEEE, 37--44.
[7]
Ariel Cohen, Amir Pnueli, and Lenore D. Zuck. 2008. Mechanical verification of transactional memories with non-transactional memory accesses. In International Conference on Computer Aided Verification. Springer, 121--134.
[8]
Luke Dalessandro, Michael F. Spear, and Michael L. Scott. 2010. NOrec: Streamlining STM by abolishing ownership records. In Proceedings of the 15th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP’10), Vol. 45. ACM, 67--78.
[9]
Dave Dice, Ori Shalev, and Nir Shavit. 2006. Transactional locking II. In International Symposium on Distributed Computing. Springer, 194--208.
[10]
Simon Doherty, Lindsay Groves, Victor Luchangco, and Mark Moir. 2013. Towards formally specifying and verifying transactional memory. Formal Aspects Comput. 25, 5 (2013), 1--31.
[11]
Michael Emmi, Rupak Majumdar, and Roman Manevich. 2010. Parameterized verification of transactional memories. In Proceedings of the 31st ACM SIGPLAN Conference on Programming Language Design and Implementation 2010 (PLDI’10), Vol. 45. ACM, 134--145.
[12]
Cormac Flanagan, Stephen N. Freund, and Jaeheon Yi. 2008. Velodrome: A sound and complete dynamic atomicity checker for multithreaded programs. Proceedings of the 29th ACM SIGPLAN Conference on Programming Language Design and Implementation 2008 (PLDI’08). 293--303.
[13]
Cormac Flanagan and Patrice Godefroid. 2005. Dynamic partial-order reduction for model checking software. In Proceedings of the 32nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages 2005 (POPL’05), Vol. 40. ACM, 110--121.
[14]
Rachid Guerraoui, Thomas A. Henzinger, Barbara Jobstmann, and Vasu Singh. 2008. Model checking transactional memories. In Proceedings of the 29th ACM SIGPLAN Conference on Programming Language Design and Implementation 2008 (PLDI’08). 372--382.
[15]
Rachid Guerraoui, Thomas A. Henzinger, and Vasu Singh. 2008. Completeness and nondeterminism in model checking transactional memories. Lect. Not. Comput. Sci. 5201 (2008), 21--35.
[16]
Rachid Guerraoui, Thomas A. Henzinger, and Vasu Singh. 2009. Software transactional memory on relaxed memory models. In Proceedings of the International Conference on Computer-Aided Verification (CAV’09), Vol. 9. Springer, 321--336.
[17]
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.
[18]
Maurice Herlihy and Eric Koskinen. 2008. Transactional boosting: A methodology for highly-concurrent transactional objects. In Proceedings of the 13th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming. ACM, 207--216.
[19]
Maurice Herlihy and J Eliot B Moss. 1993. Transactional Memory: Architectural Support for Lock-free Data Structures. Vol. 21. ACM.
[20]
Gerard J. Holzmann. 1997. The model checker SPIN. IEEE Trans. Softw. Eng. 23, 5 (1997), 279--295.
[21]
Phillip W Hutto and Mustaque Ahamad. 1990. Slow memory: Weakening consistency to enhance concurrency in distributed shared memories. In Proceedings of the 10th International Conference on Distributed Computing Systems 1990. IEEE, 302--309.
[22]
Heiner Litz, Ricardo J Dias, and David R Cheriton. 2015. Efficient correction of anomalies in snapshot isolation transactions. ACM Trans. Arch. Code Optimiz. 11, 4 (2015), 65.
[23]
Chaiyasit Manovit, Sudheendra Hangal, Hassan Chafi, Austen McDonald, Christos Kozyrakis, and Kunle Olukotun. 2006. Testing implementations of transactional memory. In Proceedings of the 15th International Conference on Parallel Architectures and Compilation Techniques. ACM, 134--143.
[24]
Virendra J. Marathe, Michael F. Spear, Christopher Heriot, Athul Acharya, David Eisenstat, William N. Scherer III, and Michael L. Scott. 2006. Lowering the overhead of nonblocking software transactional memory. In Workshop on Languages, Compilers, and Hardware Support for Transactional Computing (TRANSACT’06).
[25]
Madanlal Musuvathi, Shaz Qadeer, Thomas Ball, Gerard Basler, Piramanayagam Arumuga Nainar, and Iulian Neamtiu. 2008. Finding and reproducing heisenbugs in concurrent programs. In Proceedingso of the USENIX Symposium on Operating Systems Design and Implementation (OSDI’08), Vol. 8. 267--280.
[26]
Peter Muth, Thomas C. Rakow, Gerhard Weikum, Peter Brossler, and Christof Hasse. 1993. Semantic concurrency control in object-oriented database systems. In Proceedings of the 9th International Conference on Data Engineering 1993. IEEE, 233--242.
[27]
Brian Norris and Brian Demsky. 2013. CDSchecker: Checking concurrent data structures written with C/C++ atomics. In Proceedings of the 2013 ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages and Applications (OOPSLA’13), Vol. 48. ACM, 131--150.
[28]
John O’Leary, Bratin Saha, and Mark R. Tuttle. 2009. Model checking transactional memory with Spin. In Proceedings of the 29th IEEE International Conference on Distributed Computing Systems 2009 (ICDCS’09). IEEE, 335--342.
[29]
Christos H. Papadimitriou. 1979. The serializability of concurrent database updates. J. ACM 26, 4 (1979), 631--653.
[30]
Michel Raynal, Gérard Thia-Kime, and Mustaque Ahamad. 1997. From serializable to causal transactions for collaborative applications. In Proceedings of the 23rd EUROMICRO Conference New Frontiers of Information Technology (EUROMICRO’97). IEEE, 314--321.
[31]
Bratin Saha, Ali-Reza Adl-Tabatabai, Richard L. Hudson, Chi Cao Minh, and Benjamin Hertzberg. 2006. McRT-STM: A high performance software transactional memory system for a multi-core runtime. In Proceedings of the 11th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming. ACM, 187--197.
[32]
Manfred Schmidt-Schauß and David Sabel. 2013. Correctness of an STM Haskell Implementation. Vol. 48. ACM.
[33]
Peter M. Schwarz and Alfred Z Spector. 1984. Synchronizing shared abstract types. ACM Trans. Comput. Syst. 2, 3 (1984), 223--250.
[34]
Alexander Spiegelman, Guy Golan-Gueta, and Idit Keidar. 2016. Transactional data structure libraries. In Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM, 682--696.
[35]
Gary D. Walborn and Panos K. Chrysanthis. 1995. Supporting semantics-based transaction processing in mobile database applications. In Proceedings of the 14th Symposium on Reliable Distributed Systems 1995. IEEE, 31--40.
[36]
Paul Wu and Alan Fekete. 2003. An empirical study of commutativity in application code. In Proceedings of the 7th International Database Engineering and Applications Symposium 2003. IEEE, 361--369.
[37]
Paul Wu, Alan Fekete, and Uwe Rohm. 2008. The efficacy of commutativity-based semantic locking in a real-world application. IEEE Trans. Knowl. Data Eng. 20, 3 (2008), 427--431.
[38]
Deli Zhang and Damian Dechev. 2016. Lock-free transactions without rollbacks for linked data structures. In Proceedings of the 28th ACM Symposium on Parallelism in Algorithms and Architectures. ACM, 325--336.

Cited By

View all
  • (2022)Exploring Opacity Software Transactional Memory in Haskell through Graph TransformationProceedings of the XXVI Brazilian Symposium on Programming Languages10.1145/3561320.3561325(15-23)Online publication date: 6-Oct-2022
  • (2022)C4: verified transactional objectsProceedings of the ACM on Programming Languages10.1145/35273246:OOPSLA1(1-31)Online publication date: 29-Apr-2022
  • (2021)A Graph Transformation System formalism for correctness of Transactional Memory algorithmsProceedings of the 25th Brazilian Symposium on Programming Languages10.1145/3475061.3475080(49-57)Online publication date: 27-Sep-2021
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Transactions on Architecture and Code Optimization
ACM Transactions on Architecture and Code Optimization  Volume 14, Issue 4
December 2017
600 pages
ISSN:1544-3566
EISSN:1544-3973
DOI:10.1145/3154814
Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 14 November 2017
Accepted: 01 September 2017
Revised: 01 September 2017
Received: 01 June 2017
Published in TACO Volume 14, Issue 4

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Concurrency
  2. correctness verification
  3. transactional data structure

Qualifiers

  • Research-article
  • Research
  • Refereed

Funding Sources

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)72
  • Downloads (Last 6 weeks)7
Reflects downloads up to 05 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2022)Exploring Opacity Software Transactional Memory in Haskell through Graph TransformationProceedings of the XXVI Brazilian Symposium on Programming Languages10.1145/3561320.3561325(15-23)Online publication date: 6-Oct-2022
  • (2022)C4: verified transactional objectsProceedings of the ACM on Programming Languages10.1145/35273246:OOPSLA1(1-31)Online publication date: 29-Apr-2022
  • (2021)A Graph Transformation System formalism for correctness of Transactional Memory algorithmsProceedings of the 25th Brazilian Symposium on Programming Languages10.1145/3475061.3475080(49-57)Online publication date: 27-Sep-2021
  • (2019)Wait-free Dynamic Transactions for Linked Data StructuresProceedings of the 10th International Workshop on Programming Models and Applications for Multicores and Manycores10.1145/3303084.3309491(41-50)Online publication date: 17-Feb-2019
  • (2019)CCSpecProceedings of the 27th International Conference on Program Comprehension10.1109/ICPC.2019.00041(220-230)Online publication date: 25-May-2019

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Full Access

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media