Verification of Snapshot Isolation in Transactional Memory Java Programs

This paper presents an automatic verification technique for transactional memory Java programs executing under snapshot isolation level. We certify which transactions in a program are safe to execute under snapshot isolation without triggering the write-skew anomaly, opening the way to run-time optimizations that may lead to considerable performance enhancements. Our work builds on a novel deep-heap analysis technique based on separation logic to statically approximate the read- and write-sets of a transactional memory Java program. We implement our technique and apply our tool to a set of micro benchmarks and also to one benchmark of the STAMP package. We corroborate known results, certifying some of the examples for safe execution under snapshot isolation by proving the absence of write-skew anomalies. In other cases our analysis has identified transactions that potentially trigger previously unknown write-skew anomalies.

[1]  Jim Gray,et al.  A critique of ANSI SQL isolation levels , 1995, SIGMOD '95.

[2]  Patrick Cousot,et al.  Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints , 1977, POPL.

[3]  Torvald Riegel,et al.  Snapshot Isolation for Software Transactional Memory , 2006 .

[4]  Rajeev Alur,et al.  A Temporal Logic of Nested Calls and Returns , 2004, TACAS.

[5]  Nir Shavit,et al.  Noninvasive concurrency with Java STM , 2009 .

[6]  John C. Reynolds,et al.  Separation logic: a logic for shared mutable data structures , 2002, Proceedings 17th Annual IEEE Symposium on Logic in Computer Science.

[7]  James Brotherston,et al.  Cyclic proofs of program termination in separation logic , 2008, POPL '08.

[8]  Matthew J. Parkinson,et al.  jStar: towards practical verification for java , 2008, OOPSLA.

[9]  João Lourenço,et al.  Efficient and Correct Transactional Memory Programs Combining Snapshot Isolation and Static Analysis , 2011 .

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

[11]  Dennis Shasha,et al.  Making snapshot isolation serializable , 2005, TODS.

[12]  S. Sudarshan,et al.  Automating the Detection of Snapshot Isolation Anomalies , 2007, VLDB.

[13]  Brian Campbell,et al.  Amortised Memory Analysis Using the Depth of Data Structures , 2009, ESOP.

[14]  Maurice Herlihy,et al.  Software transactional memory for dynamic-sized data structures , 2003, PODC '03.

[15]  Laurie Hendren,et al.  Soot: a Java bytecode optimization framework , 2010, CASCON.

[16]  Anna Philippou,et al.  Tools and Algorithms for the Construction and Analysis of Systems , 2018, Lecture Notes in Computer Science.

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

[18]  Peter W. O'Hearn,et al.  Compositional Shape Analysis by Means of Bi-Abduction , 2011, JACM.

[19]  G. Ramalingam,et al.  Safe programmable speculative parallelism , 2010, PLDI '10.

[20]  Annette Bieniusa,et al.  Consistency in hindsight: A fully decentralized STM algorithm , 2010, 2010 IEEE International Symposium on Parallel & Distributed Processing (IPDPS).

[21]  Peter W. O'Hearn,et al.  A Local Shape Analysis Based on Separation Logic , 2006, TACAS.

[22]  Philippa Gardner,et al.  Automatic Parallelization with Separation Logic , 2009, ESOP.