Abstract
Memory models for shared-memory concurrent programming languages typically guarantee sequential consistency (SC) semantics for datarace-free (DRF) programs, while providing very weak or no guarantees for non-DRF programs. In effect programmers are expected to write only DRF programs, which are then executed with SC semantics. With this in mind, we propose a novel scalable solution for dataflow analysis of concurrent programs, which is proved to be sound for DRF programs with SC semantics. We use the synchronization structure of the program to propagate dataflow information among threads without requiring to consider all interleavings explicitly. Given a dataflow analysis that is sound for sequential programs and meets certain criteria, our technique automatically converts it to an analysis for concurrent programs.
Chapter PDF
Similar content being viewed by others
References
Andersen, L.O.: Program Analysis and Specialization for the C Programming Language. Ph.D. thesis, DIKU, University of Copenhagen (1994)
Boehm, H.J., Adve, S.V.: Foundations of the C++ Concurrency Memory Model. In: Proceedings of the 2008 ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 68–78. ACM, New York (2008)
Chugh, R., Voung, J.W., Jhala, R., Lerner, S.: Dataflow Analysis for Concurrent Programs Using Datarace Detection. In: Proceedings of the 2008 ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 316–326. ACM, New York (2008)
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, New York (1977)
De, A., D’Souza, D., Nasre, R.: Dataflow Analysis for Datarace-Free Programs. Tech. Rep. IISc-CSA-TR-2010-8, Computer Science and Automation, Indian Institute of Science, India (December 2010), http://aditya.csa.iisc.ernet.in/TR/2010/8/
Dwyer, M.B., Clarke, L.A.: Data Flow Analysis for Verifying Properties of Concurrent Programs. In: Proceedings of the 2nd ACM SIGSOFT Symposium on Foundations of Software Engineering, pp. 62–75. ACM, New York (1994)
Farzan, A., Kincaid, Z.: Compositional Bitvector Analysis for Concurrent Programs with Nested Locks. In: Cousot, R., Martel, M. (eds.) SAS 2011. LNCS, vol. 6337, pp. 253–270. Springer, Heidelberg (2011)
Flanagan, C., Freund, S., Qadeer, S.: Thread-Modular Verification for Shared-Memory Programs. In: Le Métayer, D. (ed.) ESOP 2002. LNCS, vol. 2305, pp. 262–277. Springer, Heidelberg (2002)
Flanagan, C., Qadeer, S.: Thread-Modular Model Checking. In: Ball, T., Rajamani, S.K. (eds.) SPIN 2003. LNCS, vol. 2648, p. 624. Springer, Heidelberg (2003)
Gotsman, A., Berdine, J., Cook, B., Sagiv, M.: Thread-Modular Shape Analysis. In: Proceedings of the 2007 ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 266–277. ACM, New York (2007)
Grunwald, D., Srinivasan, H.: Data Flow Equations for Explicitly Parallel Programs. In: Proceedings of the 4th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pp. 159–168. ACM, New York (1993)
JSR-133 Expert Group: JSR-133: Java Memory Model and Thread Specification (August 2004), http://www.cs.umd.edu/~pugh/java/memoryModel/jsr133.pdf
Kam, J.B., Ullman, J.D.: Monotone Data Flow Analysis Frameworks. Acta Inf. 7, 305–317 (1977)
Kildall, G.A.: A Unified Approach to Global Program Optimization. In: Proceedings of the 1st ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages, pp. 194–206. ACM, New York (1973)
Knoop, J., Steffen, B., Vollmer, J.: Parallelism for Free: Efficient and Optimal Bitvector Analyses for Parallel Programs. ACM Trans. Program. Lang. Syst. 18(3), 268–299 (1996)
Lee, J., Padua, D.A., Midkiff, S.P.: Basic Compiler Algorithms for Parallel Programs. In: Proceedings of the 7th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pp. 1–12. ACM, New York (1999)
Lhoták, O.: Spark: A Flexible Points-to Analysis Framework for Java. Master’s thesis, McGill University (December 2002)
LLVM Project. The LLVM Compiler Infrastructure, http://llvm.org/
Malkis, A., Podelski, A., Rybalchenko, A.: Thread-Modular Counterexample-Guided Abstraction Refinement. In: Cousot, R., Martel, M. (eds.) SAS 2010. LNCS, vol. 6337, pp. 356–372. Springer, Heidelberg (2010)
Manson, J., Pugh, W., Adve, S.V.: The Java Memory Model. In: Proceedings of the 32nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 378–391. ACM, New York (2005)
Musuvathi, M., Qadeer, S.: Iterative Context Bounding for Systematic Testing of Multithreaded Programs. In: Proceedings of the 2007 ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 446–455. ACM, New York (2007)
Naik, M., Aiken, A., Whaley, J.: Effective Static Race Detection for Java. In: Proceedings of the 2006 ACM SIGPLAN conference on Programming Language Design and Implementation, pp. 308–319. ACM, New York (2006)
Rugina, R., Rinard, M.: Pointer Analysis for Multithreaded Programs. In: Proceedings of the ACM SIGPLAN 1999 Conference on Programming Language Design and Implementation, pp. 77–90. ACM, New York (1999)
Sevcik, J.: Program Transformations in Weak Memory Models. Ph.D. thesis, University of Edinburgh (2008)
Sharir, M., Pnueli, A.: Two Approaches to Interprocedural Data Flow Analysis, ch. 7, pp. 189–234. Prentice-Hall, Englewood Cliffs (1981)
Valle-Rai, R.: Soot: A Java Bytecode Optimization Framework. Master’s thesis, McGill University (July 2000)
Visser, W., Havelund, K., Brat, G., Park, S.: Model Checking Programs. In: Proceedings of the 15th IEEE International Conference on Automated Software Engineering, p. 3. IEEE Computer Society, Washington, DC (2000)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2011 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
De, A., D’Souza, D., Nasre, R. (2011). Dataflow Analysis for Datarace-Free Programs. In: Barthe, G. (eds) Programming Languages and Systems. ESOP 2011. Lecture Notes in Computer Science, vol 6602. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-19718-5_11
Download citation
DOI: https://doi.org/10.1007/978-3-642-19718-5_11
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-19717-8
Online ISBN: 978-3-642-19718-5
eBook Packages: Computer ScienceComputer Science (R0)