Advertisement

Compiling Parameterized X86-TSO Concurrent Programs to Cubicle-\(\mathcal {W}\)

  • Sylvain Conchon
  • David DeclerckEmail author
  • Fatiha Zaïdi
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10610)

Abstract

We present PMCx86, a compiler from x86 concurrent programs to Cubicle-\(\mathcal {W}\), a model checker for parameterized weak memory array-based transition systems. Our tool handles x86 concurrent programs designed to be executed for an arbitrary number of threads and under the TSO weak memory model. The correctness of our approach relies on a simulation result to show that the translation preserves x86-TSO semantics. To show the effectiveness of our translation scheme, we prove the safety of parameterized critical primitives found in operating systems like mutexes and synchronization barriers. To our knowledge, this is the first approach to prove safety of such parameterized x86-TSO programs.

Keywords

Model checking MCMT SMT Weak memory x86 TSO 

References

  1. 1.
  2. 2.
  3. 3.
    Abdulla, P.A., Atig, M.F., Chen, Y.-F., Leonardsson, C., Rezine, A.: Counter-example guided fence insertion under TSO. In: Flanagan, C., König, B. (eds.) TACAS 2012. LNCS, vol. 7214, pp. 204–219. Springer, Heidelberg (2012). doi: 10.1007/978-3-642-28756-5_15 CrossRefGoogle Scholar
  4. 4.
    Abdulla, P.A., Atig, M.F., Chen, Y.-F., Leonardsson, C., Rezine, A.: Memorax, a precise and sound tool for automatic fence insertion under TSO. In: Piterman, N., Smolka, S.A. (eds.) TACAS 2013. LNCS, vol. 7795, pp. 530–536. Springer, Heidelberg (2013). doi: 10.1007/978-3-642-36742-7_37 CrossRefGoogle Scholar
  5. 5.
    Abdulla, P.A., Delzanno, G., Henda, N.B., Rezine, A.: Regular model checking without transducers (on efficient verification of parameterized systems). In: Grumberg, O., Huth, M. (eds.) TACAS 2007. LNCS, vol. 4424, pp. 721–736. Springer, Heidelberg (2007). doi: 10.1007/978-3-540-71209-1_56 CrossRefGoogle Scholar
  6. 6.
    Abdulla, P.A., Delzanno, G., Rezine, A.: Parameterized verification of infinite-state processes with global conditions. In: Damm, W., Hermanns, H. (eds.) CAV 2007. LNCS, vol. 4590, pp. 145–157. Springer, Heidelberg (2007). doi: 10.1007/978-3-540-73368-3_17 CrossRefGoogle Scholar
  7. 7.
    Alglave, J., Kroening, D., Nimal, V., Tautschnig, M.: Software verification for weak memory via program transformation. In: Felleisen, M., Gardner, P. (eds.) ESOP 2013. LNCS, vol. 7792, pp. 512–532. Springer, Heidelberg (2013). doi: 10.1007/978-3-642-37036-6_28 CrossRefGoogle Scholar
  8. 8.
    Apt, K.R., Kozen, D.C.: Limits for automatic verification of finite-state concurrent systems. Inf. Process. Lett. 22(6), 307–309 (1986)MathSciNetCrossRefGoogle Scholar
  9. 9.
    Atig, M.F., Bouajjani, A., Burckhardt, S., Musuvathi, M.: On the verification problem for weak memory models. In: POPL, pp. 7–18 (2010)Google Scholar
  10. 10.
    Bouajjani, A., Derevenetc, E., Meyer, R.: Checking and enforcing robustness against TSO. In: Felleisen, M., Gardner, P. (eds.) ESOP 2013. LNCS, vol. 7792, pp. 533–553. Springer, Heidelberg (2013). doi: 10.1007/978-3-642-37036-6_29 CrossRefGoogle Scholar
  11. 11.
    Bouajjani, A., Meyer, R., Möhlmann, E.: Deciding robustness against total store ordering. In: Aceto, L., Henzinger, M., Sgall, J. (eds.) ICALP 2011. LNCS, vol. 6756, pp. 428–440. Springer, Heidelberg (2011). doi: 10.1007/978-3-642-22012-8_34 CrossRefGoogle Scholar
  12. 12.
    Burckhardt, S., Musuvathi, M.: Effective program verification for relaxed memory models. In: Gupta, A., Malik, S. (eds.) CAV 2008. LNCS, vol. 5123, pp. 107–120. Springer, Heidelberg (2008). doi: 10.1007/978-3-540-70545-1_12 CrossRefGoogle Scholar
  13. 13.
    Burnim, J., Sen, K., Stergiou, C.: Sound and complete monitoring of sequential consistency for relaxed memory models. In: Abdulla, P.A., Leino, K.R.M. (eds.) TACAS 2011. LNCS, vol. 6605, pp. 11–25. Springer, Heidelberg (2011). doi: 10.1007/978-3-642-19835-9_3 CrossRefGoogle Scholar
  14. 14.
    Clarke, E.M., Grumberg, O., Browne, M.C.: Reasoning about networks with many identical finite-state processes. In: PODC 1986, NY, USA. ACM, New York (1986)Google Scholar
  15. 15.
    Conchon, S., Declerck, D., Zaïdi, F.: Compiling parameterized X86-TSO concurrent programs to cubicle-W. https://www.lri.fr/~declerck/pmcx86.pdf
  16. 16.
    Conchon, S., Goel, A., Krstić, S., Mebsout, A., Zaïdi, F.: Cubicle: a parallel SMT-based model checker for parameterized systems. In: Madhusudan, P., Seshia, S.A. (eds.) CAV 2012. LNCS, vol. 7358, pp. 718–724. Springer, Heidelberg (2012). doi: 10.1007/978-3-642-31424-7_55 CrossRefGoogle Scholar
  17. 17.
    Dan, A., Meshman, Y., Vechev, M., Yahav, E.: Effective abstractions for verification under relaxed memory models. In: D’Souza, D., Lal, A., Larsen, K.G. (eds.) VMCAI 2015. LNCS, vol. 8931, pp. 449–466. Springer, Heidelberg (2015). doi: 10.1007/978-3-662-46081-8_25 Google Scholar
  18. 18.
    German, S.M., Sistla, A.P.: Reasoning about systems with many processes. J. ACM 39(3), 675–735 (1992)MathSciNetCrossRefzbMATHGoogle Scholar
  19. 19.
    Ghilardi, S., Ranise, S.: MCMT: a model checker modulo theories. In: Giesl, J., Hähnle, R. (eds.) IJCAR 2010. LNCS, vol. 6173, pp. 22–29. Springer, Heidelberg (2010). doi: 10.1007/978-3-642-14203-1_3 CrossRefGoogle Scholar
  20. 20.
    Herlihy, M., Shavit, N.: The Art of Multiprocessor Programming. Morgan Kaufmann Publishers Inc., San Francisco (2008)Google Scholar
  21. 21.
    Intel Corporation: Intel 64 and IA-32 Architectures SDM, December 2016Google Scholar
  22. 22.
    Kuperstein, M., Vechev, M.T., Yahav, E.: Partial-coherence abstractions for relaxed memory models. In: PLDI, pp. 187–198 (2011)Google Scholar
  23. 23.
    Lamport, L.: How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Trans. Comput. 28(9), 690–691 (1979)CrossRefzbMATHGoogle Scholar
  24. 24.
    Linden, A., Wolper, P.: A verification-based approach to memory fence insertion in PSO memory systems. In: Piterman, N., Smolka, S.A. (eds.) TACAS 2013. LNCS, vol. 7795, pp. 339–353. Springer, Heidelberg (2013). doi: 10.1007/978-3-642-36742-7_24 CrossRefGoogle Scholar
  25. 25.
    Sewell, P., Sarkar, S., Owens, S., Nardelli, F.Z., Myreen, M.O.: X86-TSO: a rigorous and usable programmer’s model for x86 multiprocessors. Commun. ACM 53(7), 89–97 (2010)CrossRefGoogle Scholar

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  • Sylvain Conchon
    • 1
    • 2
  • David Declerck
    • 1
    • 2
    Email author
  • Fatiha Zaïdi
    • 1
  1. 1.LRI (CNRS & Univ. Paris-Sud), Université Paris-SaclayOrsayFrance
  2. 2.Inria, Université Paris-SaclayPalaiseauFrance

Personalised recommendations