Static Analysis of Run-Time Errors in Embedded Critical Parallel C Programs

  • Antoine Miné
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6602)


We present a static analysis by Abstract Interpretation to check for run-time errors in parallel C programs. Following our work on Astrée, we focus on embedded critical programs without recursion nor dynamic memory allocation, but extend the analysis to a static set of threads. Our method iterates a slightly modified non-parallel analysis over each thread in turn, until thread interferences stabilize. We prove the soundness of the method with respect to a sequential consistent semantics and a reasonable weakly consistent memory semantics. We then show how to take into account mutual exclusion and thread priorities through partitioning over the scheduler state. We present preliminary experimental results analyzing a real program with our prototype, Thésée, and demonstrate the scalability of our approach.


Parallel programs static analysis Abstract Interpretation run-time errors 


  1. 1.
    Adve, S.V., Gharachorloo, K.: Shared memory consistency models: A tutorial. IEEE Comp. 29(12), 66–76 (1996)CrossRefGoogle Scholar
  2. 2.
    Aeronautical Radio, Inc. (ARINC). ARINC 653,
  3. 3.
    Atig, M.F., Bouajjani, A., Burckhardt, S., Musuvathi, M.: On the verification problem for weak memory models. In: 37th ACM SIGACT/SIGPLAN Symp. on Principles of Prog. Lang., pp. 7–18. ACM, New York (2010)Google Scholar
  4. 4.
    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: AIAA Infotech@Aerospace, vol. AIAA-2010-3385, pp. 1–38. AIAA (American Institute of Aeronautics and Astronautics) (April 2010)Google Scholar
  5. 5.
    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: ACM SIGPLAN Conf. on Prog. Lang. Design and Implementation, pp. 196–207. ACM, New York (2003)Google Scholar
  6. 6.
    Carré, J.-L., Hymans, C.: From single-thread to multithreaded: An efficient static analysis algorithm. Technical Report arXiv:0910.5833v1, EADS (October 2009)Google 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: 4th ACM Symp. on Principles of Prog. Lang., pp. 238–252. ACM, New York (1977)Google Scholar
  8. 8.
    Cousot, P., Cousot, R.: Invariance proof methods and analysis techniques for parallel programs. In: Automatic Prog. Construction Techniques, ch. 12, pp. 243–271. Macmillan, New York (1984)Google Scholar
  9. 9.
    de Roever, W.-P., de Boer, F., Hanneman, U., Hooman, J., Lakhnech, Y., Poel, M., Zwiers, J.: Concurrency Verification: Introduction to Compositional and Noncompositional Methods. Cambridge University Press, Cambridge (2001)zbMATHGoogle Scholar
  10. 10.
    Delmas, D., Souyris, J.: Astrée: from research to industry. In: Riis Nielson, H., Filé, G. (eds.) SAS 2007. LNCS, vol. 4634, pp. 437–451. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  11. 11.
    Ferrara, P.: Static analysis via abstract interpretation of the happens-before memory model. In: Beckert, B., Hähnle, R. (eds.) TAP 2008. LNCS, vol. 4966, pp. 116–133. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  12. 12.
    Godefroid, P.: Partial-Order Methods for the Verification of Concurrent Systems – An Approach to the State-Explosion Problem. PhD thesis, University of Liege, Computer Science Department (1994)Google Scholar
  13. 13.
    Lamport, L.: Proving the correctness of multiprocess programs. IEEE Trans. on Software Engineering 3(2), 125–143 (1977)MathSciNetCrossRefzbMATHGoogle Scholar
  14. 14.
    Lamport, L.: Time, clocks, and the ordering of events in a distributed system. ACM Comm. 21(7), 558–565 (1978)CrossRefzbMATHGoogle Scholar
  15. 15.
    Lamport, L.: How to make a multiprocessor computer that correctly executes multiprocess programs. IEEE Trans. on Computers 28, 690–691 (1979)CrossRefzbMATHGoogle Scholar
  16. 16.
    Manson, J., Pugh, B., Adve, S.V.: The Java memory model. In: 32nd ACM SIGPLAN/SIGACT Symp. on Principles of Prog. Lang., pp. 378–391. ACM, New York (2005)Google Scholar
  17. 17.
    Miné, A.: The octagon abstract domain. Higher-Order and Symbolic Computation 19(1), 31–100 (2006)MathSciNetCrossRefzbMATHGoogle Scholar
  18. 18.
    Nielson, F., Nielson, H.R., Hankin, C.: Principles of Program Analysis. Springer, Heidelberg (1999)CrossRefzbMATHGoogle Scholar
  19. 19.
    Owicki, S., Gries, D.: An axiomatic proof technique for parallel programs I. Acta Informatica 6(4), 319–340 (1976)MathSciNetCrossRefzbMATHGoogle Scholar
  20. 20.
    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)CrossRefGoogle Scholar
  21. 21.
    Reynolds, J.C.: Toward a grainless semantics for shared-variable concurrency. In: Lodaya, K., Mahajan, M. (eds.) FSTTCS 2004. LNCS, vol. 3328, pp. 35–48. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  22. 22.
    Saraswat, V.A., Jagadeesan, R., Michael, M.M., von Praun, C.: A theory of memory models. In: 12th ACM SIGPLAN Symp. on Principles and Practice of Parallel Prog., pp. 161–172. ACM, New York (2007)Google Scholar
  23. 23.
    Steensgaard, B.: Points-to analysis in almost linear time. In: 23rd ACM SIGPLAN/SIGACT Symp. on Principles of Prog. Lang., pp. 32–41. ACM, New York (1996)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Antoine Miné
    • 1
  1. 1.CNRS & École Normale SupérieureParisFrance

Personalised recommendations