Advertisement

Precise Thread-Modular Abstract Interpretation of Concurrent Programs Using Relational Interference Abstractions

  • Raphaël Monat
  • Antoine Miné
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10145)

Abstract

We present a static analysis by abstract interpretation of numeric properties in multi-threaded programs. The analysis is sound (assuming a sequentially consistent memory), parameterized by a choice of abstract domains and, in order to scale up, it is modular, in that it iterates over each thread individually (possibly several times) instead of iterating over their product. We build on previous work that formalized rely-guarantee verification methods as a concrete, fixpoint-based semantics, and then apply classic numeric abstractions to abstract independently thread states and thread interference. This results in a flexible algorithm allowing a wide range of precision versus cost trade-offs, and able to infer even flow-sensitive and relational thread interference. We implemented our method in an analyzer prototype for a simple language and experimented it on several classic mutual exclusion algorithms for two or more threads. Our prototype is instantiated with the polyhedra domain and employs simple control partitioning to distinguish critical sections from surrounding code. It relates the variables of all threads using polyhedra, which limits its scalability in the number of variables. Nevertheless, preliminary experiments and comparison with ConcurInterproc show that modularity enables scaling to a large number of thread instances, provided that the total number of variables stays small.

Keywords

Program verification Concurrent programs Abstract interpretation Thread-modular analyses Rely-guarantee methods Numeric invariant generation 

References

  1. 1.
    Atig, M.F., Bouajjani, A., Burckhardt, S., Musuvathi, M.: On the verification problem for weak memory models. In: POPL 2010, pp. 7–18. ACM, January 2010Google Scholar
  2. 2.
    Bertrane, J., Cousot, P., Cousot, R., Feret, J., Mauborgne, L., Miné, A., Rival, X.: Static analysis and verification of aerospace software by abstract interpretation. In: Infotech\(@\)Aerospace. AIAA, vol. 2010-3385, pp. 1–38. AIAA, April 2010Google Scholar
  3. 3.
    Blanchet, B., Cousot, P., Cousot, R., Feret, J., Mauborgne, L., Miné, A., Monniaux, D., Rival, X.: A static analyzer for large safety-critical software. In: PLDI 2003, pp. 196–207. ACM, June 2003Google Scholar
  4. 4.
    Bourdoncle, F.: Efficient chaotic iteration strategies with widenings. In: BjØrner, D., Broy, M., Pottosin, I.V. (eds.) Formal Methods in Programming and Their Applications, FMPA 1993. LNCS, vol. 735, pp. 128–141. Springer, Heidelberg (1993)Google Scholar
  5. 5.
    Carré, J.L., Hymans, C.: From single-thread to multithreaded: an efficient static analysis algorithm. Technical report. arXiv:0910.5833v1, EADS October 2009
  6. 6.
    Cohen, A., Namjoshi, K.S.: Local proofs for global safety properties. Formal Methods Syst. Des. 34(2), 104–125 (2008)CrossRefzbMATHGoogle Scholar
  7. 7.
    Cousot, P., Cousot, R.: Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: POPL 1977, pp. 238–252. ACM, January 1977Google Scholar
  8. 8.
    Cousot, P., Cousot, R.: Invariance proof methods and analysis techniques for parallel programs. In: Automatic Program Construction Techniques, Chap. 12, pp. 243–271. Macmillan, New York (1984)Google Scholar
  9. 9.
    Cousot, P., Halbwachs, N.: Automatic discovery of linear restraints among variables of a program. In: POPL 1978, pp. 84–97. ACM (1978)Google Scholar
  10. 10.
    Donaldson, A., Kaiser, A., Kroening, D., Tautschnig, M., Wahl, T.: Counterexample-guided abstraction refinement for symmetric concurrent programs. Formal Methods Syst. Des. 41(1), 25–44 (2012)CrossRefzbMATHGoogle Scholar
  11. 11.
    Dwyer, M.B.: Modular flow analysis for concurrent software. In: ASE 1997, pp. 264–273. IEEE Computer Society (1997)Google Scholar
  12. 12.
    Farzan, A., Kincaid, Z.: Duet: static analysis for unbounded parallelism. In: Sharygina, N., Veith, H. (eds.) CAV 2013. LNCS, vol. 8044, pp. 191–196. Springer, Heidelberg (2013). doi: 10.1007/978-3-642-39799-8_12 CrossRefGoogle Scholar
  13. 13.
    Godefroid, P.: Partial-order methods for the verification of concurrent systems - an approach to the state-explosion problem. Ph.D. thesis, University of Liege, Computer Science Department (1994)Google Scholar
  14. 14.
    Grebenshchikov, S., Lopes, N.P., Popeea, C., Rybalchenko, A.: Synthesizing software verifiers from proof rules. In: PLDI 2012, pp. 405–416. ACM (2012)Google Scholar
  15. 15.
    Grunwald, D., Srinivasan, H.: Data flow equations for explicitly parallel programs. In: PPOPP 1993, pp. 159–168. ACM (1993)Google Scholar
  16. 16.
    Gupta, A., Popeea, C., Rybalchenko, A.: Threader: a constraint-based verifier for multi-threaded programs. In: Gopalakrishnan, G., Qadeer, S. (eds.) CAV 2011. LNCS, vol. 6806, pp. 412–417. Springer, Heidelberg (2011). doi: 10.1007/978-3-642-22110-1_32 CrossRefGoogle Scholar
  17. 17.
  18. 18.
    Jeannet, B.: Relational interprocedural verification of concurrent programs. Softw. Syst. Model. 12(2), 285–306 (2013)CrossRefGoogle Scholar
  19. 19.
    Jeannet, B., Miné, A.: Apron: a library of numerical abstract domains for static analysis. In: Bouajjani, A., Maler, O. (eds.) CAV 2009. LNCS, vol. 5643, pp. 661–667. Springer, Heidelberg (2009). doi: 10.1007/978-3-642-02658-4_52 CrossRefGoogle Scholar
  20. 20.
    Jones, C.B.: Development methods for computer programs including a notion of interference. Ph.D. thesis, Oxford University, June 1981Google Scholar
  21. 21.
    Kusano, M., Wang, C.: Flow-sensitive composition of thread-modular abstract interpretation. In: FSE 2016, pp. 799–809. ACM (2016)Google Scholar
  22. 22.
    Lamport, L.: How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Trans. Comput. 28, 690–691 (1979). IEEE Computer SocietyCrossRefzbMATHGoogle Scholar
  23. 23.
    Lamport, L.: A new solution of Dijkstra’s concurrent programming problem. Commun. ACM 17(8), 453–455 (1974)MathSciNetCrossRefzbMATHGoogle Scholar
  24. 24.
    Malkis, A., Podelski, A., Rybalchenko, A.: Thread-modular verification is cartesian abstract interpretation. In: Barkaoui, K., Cavalcanti, A., Cerone, A. (eds.) ICTAC 2006. LNCS, vol. 4281, pp. 183–197. Springer, Heidelberg (2006). doi: 10.1007/11921240_13 CrossRefGoogle Scholar
  25. 25.
    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). doi: 10.1007/978-3-642-19718-5_21 CrossRefGoogle Scholar
  26. 26.
    Miné, A.: Static analysis by abstract interpretation of sequential and multi-thread programs. In: Proceedings of the 10th School of Modelling and Verifying Parallel Processes (MOVEP 2012), pp. 35–48, 3–7 December 2012Google Scholar
  27. 27.
    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). doi: 10.1007/978-3-642-54013-4_3 CrossRefGoogle Scholar
  28. 28.
    Miné, A.: Static analysis of run-time errors in embedded real-time parallel C programs. Logical Methods Comput. Sci. (LMCS) 8(26), 63 (2012)MathSciNetzbMATHGoogle Scholar
  29. 29.
    Peterson, G.L.: Myths about the mutual exclusion problem. Inf. Process. Lett. 12(3), 115–116 (1981)CrossRefzbMATHGoogle Scholar
  30. 30.
    Qadeer, S., Rehof, J.: Context-bounded model checking of concurrent software. In: Halbwachs, N., Zuck, L.D. (eds.) TACAS 2005. LNCS, vol. 3440, pp. 93–107. Springer, Heidelberg (2005). doi: 10.1007/978-3-540-31980-1_7 CrossRefGoogle Scholar

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  1. 1.École Normale Supérieure de LyonLyonFrance
  2. 2.École Normale SupérieureParisFrance
  3. 3.Sorbonnes Universités, UPMC Univ. Paris 6, Laboratoire d’informatique de Paris 6 (LIP6)ParisFrance

Personalised recommendations