Advertisement

Relational Thread-Modular Abstract Interpretation Under Relaxed Memory Models

  • Thibault SuzanneEmail author
  • Antoine Miné
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 11275)

Abstract

We address the verification problem of numeric properties in many-threaded concurrent programs under weakly consistent memory models, especially TSO. We build on previous work that proposed an abstract interpretation method to analyse these programs with relational domains. This method was not sufficient to analyse more than two threads in a decent time. Our contribution here is to rely on a rely-guarantee framework with automatic inference of thread interferences to design an analysis with a thread-modular approach and describe relational abstractions of both thread states and interferences. We show how to adapt the usual computing procedure of interferences to the additional issues raised by weakly consistent memories. We demonstrate the precision and the performance of our method on a few examples, operating a prototype analyser that verifies safety properties like mutual exclusion. We discuss how weak memory models affect the scalability results compared to a sequentially consistent environment.

References

  1. 1.
    Abdulla, P.A., Atig, M.F., Jonsson, B., Leonardsson, C.: Stateless model checking for POWER. In: Chaudhuri, S., Farzan, A. (eds.) CAV 2016. LNCS, vol. 9780, pp. 134–156. Springer, Cham (2016).  https://doi.org/10.1007/978-3-319-41540-6_8CrossRefGoogle Scholar
  2. 2.
    Abdulla, P.A., Atig, M.F., Ngo, T.-P.: The best of both worlds: trading efficiency and optimality in fence insertion for TSO. In: Vitek, J. (ed.) ESOP 2015. LNCS, vol. 9032, pp. 308–332. Springer, Heidelberg (2015).  https://doi.org/10.1007/978-3-662-46669-8_13CrossRefGoogle Scholar
  3. 3.
    Alglave, J., Kroening, D., Lugton, J., Nimal, V., Tautschnig, M.: Soundness of data flow analyses for weak memory models. In: Yang, H. (ed.) APLAS 2011. LNCS, vol. 7078, pp. 272–288. Springer, Heidelberg (2011).  https://doi.org/10.1007/978-3-642-25318-8_21CrossRefGoogle Scholar
  4. 4.
    Blackshear, S., Gorogiannis, N., O’Hearn, P.W., Sergey, I.: RacerD: compositional static race detection. Proc. ACM Program. Lang. 1(1) (2018)Google Scholar
  5. 5.
    Cousot, P., Cousot, R.: Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: Proceedings of the 4th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages, pp. 238–252. ACM (1977)Google Scholar
  6. 6.
    Gopan, D., DiMaio, F., Dor, N., Reps, T., Sagiv, M.: Numeric domains with summarized dimensions. In: Jensen, K., Podelski, A. (eds.) TACAS 2004. LNCS, vol. 2988, pp. 512–529. Springer, Heidelberg (2004).  https://doi.org/10.1007/978-3-540-24730-2_38CrossRefGoogle Scholar
  7. 7.
    Gotsman, A., Berdine, J., Cook, B., Sagiv, M.: Thread-modular shape analysis. In: ACM SIGPLAN Notices, vol. 42, pp. 266–277. ACM (2007)Google Scholar
  8. 8.
    Holík, L., Meyer, R., Vojnar, T., Wolff, S.: Effect summaries for thread-modular analysis. In: Ranzato, F. (ed.) SAS 2017. LNCS, vol. 10422, pp. 169–191. Springer, Cham (2017).  https://doi.org/10.1007/978-3-319-66706-5_9CrossRefGoogle Scholar
  9. 9.
    Jeannet, B.: The BDDApron logico-numerical abstract domains library (2009)Google Scholar
  10. 10.
    Kusano, M., Wang, C.: Flow-sensitive composition of thread-modular abstract interpretation. In: Proceedings of the 2016 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering, pp. 799–809. ACM (2016)Google Scholar
  11. 11.
    Kusano, M., Wang, C.: Thread-modular static analysis for relaxed memory models. In: Proceedings of the 2017 11th Joint Meeting on Foundations of Software Engineering, ESEC/FSE 2017, pp. 337–348. ACM (2017)Google Scholar
  12. 12.
    Lamport, L.: How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Trans. Comput. 100(9), 690–691 (1979)CrossRefGoogle Scholar
  13. 13.
    Midtgaard, J., Nielson, F., Nielson, H.R.: Iterated process analysis over lattice-valued regular expressions. In: PPDP, pp. 132–145. ACM (2016)Google Scholar
  14. 14.
    Miné, A.: Static analysis of run-time errors in embedded critical parallel C programs. In: Barthe, G. (ed.) ESOP 2011. LNCS, vol. 6602, pp. 398–418. Springer, Heidelberg (2011).  https://doi.org/10.1007/978-3-642-19718-5_21CrossRefGoogle Scholar
  15. 15.
    Miné, A.: Relational thread-modular static value analysis by abstract interpretation. In: McMillan, K.L., Rival, X. (eds.) VMCAI 2014. LNCS, vol. 8318, pp. 39–58. Springer, Heidelberg (2014).  https://doi.org/10.1007/978-3-642-54013-4_3CrossRefzbMATHGoogle Scholar
  16. 16.
    Monat, R., Miné, A.: Precise thread-modular abstract interpretation of concurrent programs using relational interference abstractions. In: Bouajjani, A., Monniaux, D. (eds.) VMCAI 2017. LNCS, vol. 10145, pp. 386–404. Springer, Cham (2017).  https://doi.org/10.1007/978-3-319-52234-0_21CrossRefzbMATHGoogle Scholar
  17. 17.
    Mukherjee, S., Padon, O., Shoham, S., D’Souza, D., Rinetzky, N.: Thread-local semantics and its efficient sequential abstractions for race-free programs. In: Ranzato, F. (ed.) SAS 2017. LNCS, vol. 10422, pp. 253–276. Springer, Cham (2017).  https://doi.org/10.1007/978-3-319-66706-5_13CrossRefGoogle Scholar
  18. 18.
    Ridge, T.: A rely-guarantee proof system for x86-TSO. In: Leavens, G.T., O’Hearn, P., Rajamani, S.K. (eds.) VSTTE 2010. LNCS, vol. 6217, pp. 55–70. Springer, Heidelberg (2010).  https://doi.org/10.1007/978-3-642-15057-9_4CrossRefGoogle Scholar
  19. 19.
    Sewell, P., Sarkar, S., Owens, S., Francesco, 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
  20. 20.
    Suzanne, T., Miné, A.: From array domains to abstract interpretation under store-buffer-based memory models. In: Rival, X. (ed.) SAS 2016. LNCS, vol. 9837, pp. 469–488. Springer, Heidelberg (2016).  https://doi.org/10.1007/978-3-662-53413-7_23CrossRefGoogle Scholar

Copyright information

© Springer Nature Switzerland AG 2018

Authors and Affiliations

  1. 1.Département d’informatique de l’ENS, École Normale Supérieure, CNRS, PSL Research UniversityParisFrance
  2. 2.InriaParisFrance
  3. 3.Sorbonne Université, CNRS, Laboratoire d’Informatique de Paris 6, LIP6ParisFrance

Personalised recommendations