Skip to main content
Log in

Precise slicing of interprocedural concurrent programs

  • Research Article
  • Published:
Frontiers of Computer Science Aims and scope Submit manuscript

Abstract

Program slicing is an effective technique for analyzing concurrent programs. However, when a conventional closure-based slicing algorithmfor sequential programs is applied to a concurrent interprocedural program, the slice is usually imprecise owing to the intransitivity of interference dependence. Interference dependence arises when a statement uses a variable defined in another statement executed concurrently. In this study, we propose a global dependence analysis approach based on a program reachability graph, and construct a novel dependence graph calledmarking-statement dependence graph (MSDG), in which each vertex is a 2-tuple of program state and statement. In contrast to the conventional program dependence graph where the vertex is a statement, the dependence relation in MSDG is transitive. When traversing MSDG, a precise slice will be obtained. To enhance the slicing efficiency without loss of precision, our slicing algorithm adopts a hybrid strategy. The procedures containing interaction statements between threads are inlined and sliced by the slicing algorithm based on program reachability graphs while allowing other procedures to be sliced as sequential programs. We have implemented our algorithm and three other representative slicing algorithms, and conducted an empirical study on concurrent Java programs. The experimental results show that our algorithm computes more precise slices than the other algorithms. Using partial-order reduction techniques, which are effective for reducing the size of a program reachability graph without loss of precision, our algorithm is optimized, thereby improving its performance to some extent.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Burns A, Wellings A. Real-Time Systems and Programming Languages: Ada, Real-Time Java and C/Real-Time POSIX. 4th Ed. Boston: Addison Wesley Longman, 2009

    MATH  Google Scholar 

  2. Xu B W, Qian J, Zhang X F, Wu Z Q, Chen L. A brief survey of program slicing. ACM SIGSOFT Software Engineering Notes, 2005, 30(2): 1–36

    Article  Google Scholar 

  3. Silva J. A vocabulary of program slicing-based techniques. ACM Computing Surveys, 2012, 44(3): 12

    Article  MATH  Google Scholar 

  4. Horwitz S, Reps T, Binkley D. Inter-procedural slicing using dependence graphs. ACM SIGPLAN Notices, 2004, 39(4): 229–243.

    Article  Google Scholar 

  5. Krinke J. Context-sensitive slicing of concurrent programs. ACM SIGSOFT Software Engineering Notes, 2003, 28(5): 178–187

    Article  Google Scholar 

  6. Nanda M G, Ramesh S. Inter-procedural slicing of multithreaded programs with applications to Java. ACM Transaction on Programming Language Systems, 2006, 28(6): 1088–1144

    Article  Google Scholar 

  7. Giffhorn D, Hammer C. Precise slicing of concurrent programs. Journal of Automated Software Engineering, 2009, 16(2): 197–234

    Article  Google Scholar 

  8. Giffhorn D. Advanced chopping of sequential and concurrent programs. Software Quality Journal, 2011, 19(2): 239–294

    Article  Google Scholar 

  9. Giffhorn D. Slicing of concurrent programs and its application to Information flow control. Dissertation for the Doctoral Degree. Karlsruhe: University of Karlsruhe, 2012

    Google Scholar 

  10. Chen Z Q, Xu BW. Slicing concurrent Java programs. ACMSIGPLAN Notices, 2001, 36(4): 41–47

    Article  Google Scholar 

  11. Qi X F, Zhou X Y, Xu X J, Zhang Y Z. Slicing concurrent programs based on program reachability graph. In: Proceedings of the 10th International Conference on Quality Software. 2010, 248–253

    Google Scholar 

  12. Qi X F, Xu B W, Zhou X Y. An approach to analyzing dependence of concurrent programs based on program reachability graphs. Acta Electronica Sinica, 2007, 35(2): 287–291

    Google Scholar 

  13. Qi X F, Xu X J, Jiang Z L, Wang P. Slicing concurrent programs based on program reachability graphs with partial-order reduction. Chinese Journal of Computer, 2014, 37(3): 568–579

    Google Scholar 

  14. Qi X F, Xu X J, Wang P. Slicing concurrent inter-procedural programs based on program reachability graphs. In: Proceedings of the 24th International Conference on Software Engineering and Knowledge Engineering. 2012, 293–298

    Google Scholar 

  15. Pezze M, Taylor R N, Young M. Graph models for reachability analysis of concurrent programs. ACM Transaction on Software Engineering and Methodology, 1995, 4(2): 171–213

    Article  Google Scholar 

  16. Nielson F, Nielson H R, Hankin C. Principles of Program Analysis. Berlin: Springer, 2015

    MATH  Google Scholar 

  17. Godefroid P, Peled D, Staskauskas M. Using partial-order methods in the formal validation of industrial concurrent programs. IEEE Transaction on Software Engineering, 1996, 22(7): 496–507

    Article  Google Scholar 

  18. Jaghoori M M, Sirjani M, Mousavi M R, Khamespanah E, Movaghar A. Symmetry and partial order reduction techniques in model checking Rebeca. Acta Information, 2010, 47(1): 33–66

    Article  MathSciNet  MATH  Google Scholar 

  19. Zhao J J. Multithreaded dependence graphs for concurrent Java programs. In: Proceedings of International Symposium on Software Engineering for Parallel and Distributed Systems. 1999, 13–23

    Google Scholar 

  20. Cheng J. Task dependence nets for concurrent systems with Ada 95 and its applications. In: Proceedings of ACM TRI-Ada International Conference. 1997, 67–78

    Google Scholar 

  21. Hatcliff J. A formal study of slicing for multi-threaded programs with JVM concurrency primitives. In: Proceedings of International Symposium on Static Analysis. 1999, 1–18

    Google Scholar 

  22. Zhang J, Jin C Z. Control-flow-based static slicing algorithm of threaded programs. Journal of Jilin University, 2003, 41(4): 481–486

    Google Scholar 

  23. Zhang Y Z. Research on program slicing techniques based on modular monadic semantics. Dissertation for the Doctoral Degree. Nanjing: Southeast University, 2006

    Google Scholar 

  24. Ramalingam G. Context-sensitive synchronization-sensitive analysis is undecidable. ACM Transactions on Programming Language Systems, 2000, 22(2): 416–430

    Article  Google Scholar 

  25. Leuschel M, Llorensb M, Oliver J, Silva J, Tamarit S. Static slicing of explicitly synchronized languages. Information and Computation, 2012, 214: 10–46

    Article  MathSciNet  MATH  Google Scholar 

Download references

Acknowledgements

This work was supported by the National Natural Science Foundation of China (Grant Nos. 61472076 and 61472077).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Zhenliang Jiang.

Additional information

Xiaofang Qi received her PhD degree in computer science at Southeast University (SEU), China in 2008. She is an associate professor in the School of Computer Science and Engineering, SEU. Her research interests include program analysis and testing, and software engineering.

Zhenliang Jiang received his MD degree in computer science at Southeast University, China in 2014. He is an engineer in Huawei Technologies Cooperation, China. His research interests include software testing and software engineering.

Electronic supplementary material

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Qi, X., Jiang, Z. Precise slicing of interprocedural concurrent programs. Front. Comput. Sci. 11, 971–986 (2017). https://doi.org/10.1007/s11704-017-6189-3

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11704-017-6189-3

Keywords

Navigation