Verification of Snapshot Isolation in Transactional Memory Java Programs

  • Ricardo J. Dias
  • Dino Distefano
  • João Costa Seco
  • João M. Lourenço
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7313)

Abstract

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.

Keywords

Memory Location Symbolic Execution Symbolic State Separation Logic Memory Region 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Barrett, C., Tinelli, C.: CVC3. In: Damm, W., Hermanns, H. (eds.) CAV 2007. LNCS, vol. 4590, pp. 298–302. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  2. 2.
    Berenson, H., Bernstein, P., Gray, J.N., Melton, J., O’Neil, E., O’Neil, P.: A critique of ANSI SQL isolation levels. In: SIGMOD 1995: Proc. of the 1995 ACM SIGMOD International Conference on Management of Data, pp. 1–10. ACM, New York (1995)CrossRefGoogle Scholar
  3. 3.
    Brotherston, J., Bornat, R., Calcagno, C.: Cyclic proofs of program termination in separation logic. In: Proc. of the 35th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2008, pp. 101–112. ACM, New York (2008)CrossRefGoogle Scholar
  4. 4.
    Calcagno, C., Distefano, D., O’Hearn, P., Yang, H.: Compositional shape analysis by means of bi-abduction. In: Proc. of the 36th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2009, pp. 289–300. ACM, New York (2009)Google Scholar
  5. 5.
    Cao Minh, C., Chung, J., Kozyrakis, C., Olukotun, K.: STAMP: Stanford transactional applications for multi-processing. In: IISWC 2008: Proc. IEEE Int. Symp. on Workload Characterization (2008)Google Scholar
  6. 6.
    Cousot, P., Cousot, R.: Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: Proc. of the 4th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages, POPL 1977, pp. 238–252. ACM, New York (1977)CrossRefGoogle Scholar
  7. 7.
    Dias, R.J., Loureno, J.M., Preguia, N.M.: Efficient and correct transactional memory programs combining snapshot isolation and static analysis. In: 3rd USENIX Conference on Hot Topics in Parallelism (HotPar 2011). Usenix Association (2011)Google Scholar
  8. 8.
    Distefano, D., O’Hearn, P.W., Yang, H.: A Local Shape Analysis Based on Separation Logic. In: Hermanns, H., Palsberg, J. (eds.) TACAS 2006. LNCS, vol. 3920, pp. 287–302. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  9. 9.
    Distefano, D., Parkinson, M.J.: jstar: towards practical verification for Java. In: Proc. of the 23rd ACM SIGPLAN Conference on Object-oriented Programming Systems Languages and Applications (OOPSLA 2008), pp. 213–226. ACM, New York (2008)CrossRefGoogle Scholar
  10. 10.
    Fekete, A., Liarokapis, D., O’Neil, E., O’Neil, P., Shasha, D.: Making snapshot isolation serializable. ACM Trans. Database Syst. 30(2), 492–528 (2005)CrossRefGoogle Scholar
  11. 11.
    Herlihy, M., Luchangco, V., Moir, M., William, N., Scherer, I.: Software transactional memory for dynamic-sized data structures. In: PODC 2003: Proc. of the Twenty-Second Annual Symposium on Principles of Distributed Computing, pp. 92–101. ACM, New York (2003)CrossRefGoogle Scholar
  12. 12.
    Jorwekar, S., Fekete, A., Ramamritham, K., Sudarshan, S.: Automating the detection of snapshot isolation anomalies. In: VLDB 2007: Proc. of the 33rd International Conference on Very Large Data Bases, pp. 1263–1274. VLDB Endowment, Vienna (2007)Google Scholar
  13. 13.
    Korland, G., Shavit, N., Felber, P.: Noninvasive concurrency with Java STM. In: MultiProg 2010: Programmability Issues for Heterogeneous Multicores (2010)Google Scholar
  14. 14.
    Prabhu, P., Ramalingam, G., Vaswani, K.: Safe programmable speculative parallelism. In: Proc. of the 2010 ACM SIGPLAN Conf. on Prog. Language Design and Implementation, PLDI 2010, pp. 50–61. ACM, New York (2010)CrossRefGoogle Scholar
  15. 15.
    Raza, M., Calcagno, C., Gardner, P.: Automatic Parallelization with Separation Logic. In: Castagna, G. (ed.) ESOP 2009. LNCS, vol. 5502, pp. 348–362. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  16. 16.
    Reynolds, J.C.: Separation logic: A logic for shared mutable data structures. In: Proc. of the 17th Annual IEEE Symposium on Logic in Computer Science, LICS 2002, pp. 55–74. IEEE Computer Society, Washington, DC (2002)CrossRefGoogle Scholar
  17. 17.
    Riegel, T., Fetzer, C., Felber, P.: Snapshot isolation for software transactional memory. In: TRANSACT 2006: First ACM SIGPLAN Workshop on Languages, Compilers, and Hardware Support for Transactional Computing, Ottawa, Canada (2006)Google Scholar
  18. 18.
    Shavit, N., Touitou, D.: Software transactional memory. In: PODC 1995: Proc. of the 14th Annual ACM Symposium on Principles of Distributed Computing, pp. 204–213. ACM, New York (1995)CrossRefGoogle Scholar
  19. 19.
    Transaction Processing Performance Council: TPC-C benchmark, revision 5.11 (2010)Google Scholar
  20. 20.
    Vallée-Rai, R., Co, P., Gagnon, E., Hendren, L., Lam, P., Sundaresan, V.: Soot - a java bytecode optimization framework. In: Proc. of the 1999 Conference of the Centre for Advanced Studies on Collaborative Research, CASCON 1999, p. 13. IBM Press (1999)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Ricardo J. Dias
    • 1
  • Dino Distefano
    • 2
  • João Costa Seco
    • 1
  • João M. Lourenço
    • 1
  1. 1.CITIUniversidade Nova de LisboaPortugal
  2. 2.Queen Mary University of LondonUK

Personalised recommendations