Compile-Time Analysis and Specialization of Clocks in Concurrent Programs

  • Nalini Vasudevan
  • Olivier Tardieu
  • Julian Dolby
  • Stephen A. Edwards
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5501)


Clocks are a mechanism for providing synchronization barriers in concurrent programming languages. They are usually implemented using primitive communication mechanisms and thus spare the programmer from reasoning about low-level implementation details such as remote procedure calls and error conditions.

Clocks provide flexibility, but programs often use them in specific ways that do not require their full implementation. In this paper, we describe a tool that mitigates the overhead of general-purpose clocks by statically analyzing how programs use them and choosing optimized implementations when available.

We tackle the clock implementation in the standard library of the X10 programming language—a parallel, distributed object-oriented language. We report our findings for a small set of analyses and benchmarks. Our tool only adds a few seconds to analysis time, making it practical to use as part of a compilation chain.


Concurrency Static Analysis Synchronization Clocks X10 NuSMV 


  1. 1.
    Charles, P., Grothoff, C., Saraswat, V., Donawa, C., Kielstra, A., Ebcioglu, K., von Praun, C., Sarkar, V.: X10: an object-oriented approach to non-uniform cluster computing. SIGPLAN Not. 40(10), 519–538 (2005)CrossRefGoogle Scholar
  2. 2.
    Saraswat, V.A., Sarkar, V., von Praun, C.: X10: concurrent programming for modern architectures. In: PPoPP 2007: Proceedings of the 12th ACM SIGPLAN symposium on Principles and practice of parallel programming, p. 271. ACM, New York (2007)Google Scholar
  3. 3.
    Cimatti, A., Clarke, E.M., Giunchiglia, E., Giunchiglia, F., Pistore, M., Roveri, M., Sebastiani, R., Tacchella, A.: NuSMV version 2: An OpenSource tool for symbolic model checking. In: Brinksma, E., Larsen, K.G. (eds.) CAV 2002. LNCS, vol. 2404, pp. 359–364. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  4. 4.
    IBM, et al.: T. j. watson libraries for analysis (2006),
  5. 5.
    Vasudevan, N., Tardieu, O., Dolby, J., Edwards, S.A.: Analysis of clocks in x10 programs (extended). Technical Report CUCS–052–08, Columbia University, Department of Computer Science, New York, USA (December 2008)Google Scholar
  6. 6.
    Smith, L.A., Bull, J.M., Obdrzálek, J.: A parallel java grande benchmark suite. In: Supercomputing 2001: Proceedings of the 2001 ACM/IEEE conference on Supercomputing (CDROM), p. 8. ACM, New York (2001)CrossRefGoogle Scholar
  7. 7.
    Strom, R.E., Yemini, S.: Typestate: A programming language concept for enhancing software reliability. IEEE Transactions on Software Engineering 12(1), 157–171 (1986)CrossRefzbMATHGoogle Scholar
  8. 8.
    Clarke, E.M., Emerson, E.A., Sistla, A.P.: Automatic verification of finite-state concurrent systems using temporal logic specifications. ACM Transactions on Programming Languages and Systems 8(2), 244–263 (1986)CrossRefzbMATHGoogle Scholar
  9. 9.
    Vasudevan, N., Edwards, S.A.: Static deadlock detection for the SHIM concurrent language. In: Proceedings of the International Conference on Formal Methods and Models for Codesign (MEMOCODE), Anaheim, California (June 2008)Google Scholar
  10. 10.
    Mercouroff, N.: An algorithm for analyzing communicating processes. In: Schmidt, D., Main, M.G., Melton, A.C., Mislove, M.W., Brookes, S.D. (eds.) MFPS 1991. LNCS, vol. 598, pp. 312–325. Springer, Heidelberg (1992)CrossRefGoogle Scholar
  11. 11.
    Hoare, C.A.R.: Communicating Sequential Processes. Prentice-Hall, Upper Saddle River (1985)zbMATHGoogle Scholar
  12. 12.
    Reppy, J., Xiao, Y.: Specialization of CML message-passing primitives. SIGPLAN Notices 42(1), 315–326 (2007)CrossRefzbMATHGoogle Scholar
  13. 13.
    Agarwal, S., Barik, R., Sarkar, V., Shyamasundar, R.K.: May-happen-in-parallel analysis of x10 programs. In: Proceedings of Principles and Practice of Parallel Programming (PPoPP), pp. 183–193. ACM, New York (2007)Google Scholar
  14. 14.
    Chandra, S., Saraswat, V., Sarkar, V., Bodik, R.: Type inference for locality analysis of distributed data structures. In: Proceedings of Principles and Practice of Parallel Programming (PPoPP), pp. 11–22. ACM, New York (2008)Google Scholar
  15. 15.
    Clarke, E.M., Grumberg, O., Jha, S., Lu, Y., Veith, H.: Counterexample-guided abstraction refinement. In: Emerson, E.A., Sistla, A.P. (eds.) CAV 2000. LNCS, vol. 1855, pp. 154–169. Springer, Heidelberg (2000)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2009

Authors and Affiliations

  • Nalini Vasudevan
    • 1
  • Olivier Tardieu
    • 2
  • Julian Dolby
    • 2
  • Stephen A. Edwards
    • 1
  1. 1.Department of Computer ScienceColumbia UniversityNew YorkUSA
  2. 2.IBM T.J. Watson Research CenterNew YorkUSA

Personalised recommendations