Abstract
Software Transactional Memory (STM) algorithms provide programmers with a synchronisation mechanism for concurrent access to shared variables. Basically, programmers can specify transactions (reading from and writing to shared state) which then execute in a “seeming” atomicity. This property is captured in a correctness criterion called opacity. For model checking the opacity of an STM algorithm, we – in principle – need to check opacity for all possible combinations of transactions with all possible values to be written. This leads to several sources of infinity during model checking: infinitely many data values, infinitely many possible accesses in transactions, and unboundedly many transactions being executed.
In this paper, we propose a technique for avoiding the first source of infinity: infinitely many different data values. To this end, we employ a notion of data independence and provide two results. First, we prove that opacity as a correctness criterion is data independent. Second, we develop conditions for checking data independence of STM algorithms and show their soundness. Together, these results allow to reduce model checking (of data independent STMs) to transactions with a single choice for values written.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
- 1.
This is the main difference to [2]: Abdulla et al. only have data values as they consider operations on concurrent data structures where the data structure is fixed and thus need not be a parameter to the method.
- 2.
Note that non-data values are not counted here.
- 3.
Note that a transaction writes at most once to a location.
- 4.
Meta data cannot be accessed via TM operations.
References
Abdulla, P.A., Dwarkadas, S., Rezine, A., Shriraman, A., Zhu, Y.: Verifying safety and liveness for the FlexTM hybrid transactional memory. In: DATE 2013, pp. 785–790 (2013)
Abdulla, P.A., Haziza, F., Holík, L., Jonsson, B., Rezine, A.: An integrated specification and verification technique for highly concurrent data structures. In: Piterman, N., Smolka, S.A. (eds.) TACAS 2013. LNCS, vol. 7795, pp. 324–338. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-36742-7_23
Baek, W., Bronson, N.G., Kozyrakis, C., Olukotun, K.: Implementing and evaluating a model checker for transactional memory systems. In: ICECCS 2010, pp. 117–126 (2010)
Bouajjani, A., Enea, C., Guerraoui, R., Hamza, J.: On verifying causal consistency. SIGPLAN Not. 52(1), 626–638 (2017)
Bouajjani, A., Enea, C., Wang, C.: Checking linearizability of concurrent priority queues. In: CONCUR 2017. Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik (2017)
Dalessandro, L., Dice, D., Scott, M., Shavit, N., Spear, M.: Transactional mutex locks. In: D’Ambra, P., Guarracino, M., Talia, D. (eds.) Euro-Par 2010. LNCS, vol. 6272, pp. 2–13. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-15291-7_2
Derrick, J., Dongol, B., Schellhorn, G., Travkin, O., Wehrheim, H.: Verifying opacity of a transactional mutex lock. In: Bjørner, N., de Boer, F. (eds.) FM 2015. LNCS, vol. 9109, pp. 161–177. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-19249-9_11
Doherty, S., Dongol, B., Derrick, J., Schellhorn, G., Wehrheim, H.: Proving opacity of a pessimistic STM. In: OPODIS 2016. LIPIcs, vol. 70, pp. 35:1–35:17. Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik (2017)
Doherty, S., Groves, L., Luchangco, V., Moir, M.: Towards formally specifying and verifying transactional memory. Formal Aspects Comput. 25(5), 769–799 (2013)
Guerraoui, R., Henzinger, T.A., Singh, V.: Completeness and nondeterminism in model checking transactional memories. In: van Breugel, F., Chechik, M. (eds.) CONCUR 2008. LNCS, vol. 5201, pp. 21–35. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-85361-9_6
Guerraoui, R., Henzinger, T.A., Singh, V.: Model checking transactional memories. Distrib. Comput. 22(3), 129–145 (2010)
Guerraoui, R., Kapalka, M.: On the correctness of transactional memory. In: Proceedings of the 13th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP 2008, pp. 175–184 (2008)
Kaynar, D.K., Lynch, N.A., Segala, R., Vaandrager, F.W.: The Theory of Timed I/O Automata. Synthesis Lectures on Distributed Computing Theory, 2nd edn. Morgan & Claypool Publishers, San Rafael (2010)
König, J., Wehrheim, H.: Value-based or conflict-based? Opacity definitions for STMs. In: Hung, D., Kapur, D. (eds.) ICTAC 2017. LNCS, vol. 10580, pp. 118–135. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-67729-3_8
Lesani, M., Palsberg, J.: Decomposing opacity. In: Kuhn, F. (ed.) DISC 2014. LNCS, vol. 8784, pp. 391–405. Springer, Heidelberg (2014). https://doi.org/10.1007/978-3-662-45174-8_27
Shacham, O., et al.: Verifying atomicity via data independence. In: Proceedings of the 2014 International Symposium on Software Testing and Analysis, pp. 26–36. ACM (2014)
Shavit, N., Touitou, D.: Software transactional memory. Distrib. Comput. 10(2), 99–116 (1997)
Wang, C., Lv, Y., Wu, P.: Decomposable relaxation for concurrent data structures. In: Steffen, B., Baier, C., van den Brand, M., Eder, J., Hinchey, M., Margaria, T. (eds.) SOFSEM 2017. LNCS, vol. 10139, pp. 188–202. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-51963-0_15
Wolper, P.: Expressing interesting properties of programs in propositional temporal logic. In: POPL, pp. 184–193 (1986)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Switzerland AG
About this paper
Cite this paper
König, J., Wehrheim, H. (2019). Data Independence for Software Transactional Memory. In: Badger, J., Rozier, K. (eds) NASA Formal Methods. NFM 2019. Lecture Notes in Computer Science(), vol 11460. Springer, Cham. https://doi.org/10.1007/978-3-030-20652-9_18
Download citation
DOI: https://doi.org/10.1007/978-3-030-20652-9_18
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-20651-2
Online ISBN: 978-3-030-20652-9
eBook Packages: Computer ScienceComputer Science (R0)