Abstract
A chop for a source statement s and a target statement t reveals the program parts involved in conveying effects from s to t. While precise chopping algorithms for sequential programs are known, no chopping algorithm for concurrent programs has been reported at all. This work introduces six chopping algorithms for concurrent programs, which offer different degrees of precision, ranging from imprecise over context-sensitive to time-sensitive. Our evaluation on concurrent Java programs shows that context-sensitive and time-sensitive chopping reduces chop sizes significantly. We further present an extensive evaluation of chopping algorithms for sequential programs and describe a new, easy-to-implement chopping technique for sequential programs that computes fast and almost context-sensitive chops.
Similar content being viewed by others
Notes
Which in case of recursion may again be p.
Intra-procedural chops are commonly computed through intersection of intra-procedural forward and backward slices.
The Java Mobile Edition for mobile devices.
As usual, conditional branching is treated here as non-deterministic branching.
It cannot lie in the procedure, because all nodes in a procedure are reachable by a call of that procedure.
Time-sensitive slicing currently seems to be practical for programs with about 10.000 LOC (Giffhorn and Hammer 2009).
Due to graph folding and procedure inlining, \(C^{\prime}_m\) may indeed contain more than one context.
For that purpose, the SDG specific parameter-passing nodes are mapped to the associated call sites. Actual-in nodes are mapped to the call node, actual-out nodes to the return node, formal-in nodes to the entry node, and formal-out nodes to the exit node.
The well-known optimization, to omit the intersection.
We ignore the visited nodes that lie outside the chop.
One could exclude the empty chops determined by the most imprecise algorithm, but this would result in handpicked chopping criteria, reducing the expressiveness of our evaluation.
References
Anderson, P., Reps, T., & Teitelbaum, T. (2003). Design and implementation of a fine-grained software inspection tool. IEEE Transactions on Software Engineering 29(8), 721–733.
Barik, R. (2005). Efficient computation of May-Happen-in-Parallel information for concurrent Java programs. In Proceeding of 18th international workshop on languages and compilers for parallel computing (LCPC’05), pp. 152–169.
Binkley, D., Harman M., & Krinke, J. (2007). Empirical study of optimization techniques for massive slicing. ACM Transactions on Program Language Systems 30(1), 3.
Brumley, D., Newsome, J., Song, D., Wang, H., & Jha, S. (2006). Towards automatic generation of vulnerability-based signatures. In Proc. SP’06, pp. 2–16.
Chen, Z., & Xu, B. (2001). Slicing concurrent Java programs. ACM SIGPLAN Notices, 36(4), 41–47.
Chen, Z., Xu, B., Yang, H., Liu, K., & Zhang, J. (2000). An approach to analyzing dependency of concurrent programs. In APAQS ’00: Proceedings of the first Asia-pacific conference on quality software, pp. 39–43.
Cheng, J. (1993). Slicing concurrent programs. Automated and Algorithmic Debugging, LNCS, 749, 223–240, Springer.
Cheng, J. (1997). Dependence analysis of parallel and distributed programs and its applications. International conference on advances in parallel and distributed computing, pp. 395–404.
Giffhorn, D. (2009). Chopping concurrent programs. In 9th IEEE International workshop conference on source code analysis and manipulation, pp. 13–22.
Giffhorn, D., & Hammer, C. (2009). Precise slicing of concurrent programs - An evaluation of static slicing algorithms for concurrent programs. Springer JASE, 16(2), 197–234.
Graf, J. (2009). Improving and evaluating the scalability of precise system dependence graphs for objectoriented languages. Tech. Rep., Universität Karlsruhe (TH), Germany.
Hammer, C. (2009). Information flow control for Java–a comprehensive approach based on path conditions in dependence graphs. PhD thesis, Universität Karlsruhe (TH).
Hammer, C., & Snelting, G. (2004). An improved slicer for Java. Workshop on program analysis for software tools and engineering (PASTE’04), pp. 17–22.
Hammer, C., & Snelting, G. (2009). Flow-sensitive, context-sensitive, and object-sensitive information flow control based on program dependence graphs. Springer IJIS, 8(6), 399–422.
Hatcliff, J., Corbett, J. C., Dwyer, M. B., Sokolowski, S., & Zheng, H. (1999). A formal study of slicing for multi-threaded programs with JVM concurrency primitives. Static Analysis Symposium, LNCS, 1694, pp. 1–18, Springer.
Horwitz, S. B., Reps, T. W., & Binkley, D. (1990). Interprocedural slicing using dependence graphs. ACM Transactions on Program Language Systems 12(1), 26–60.
Jackson, D., & Rollins, E. J. (1994). A new model of program dependences for reverse engineering. In Proc. FSE, pp. 2–10.
Krinke, J. (1998). Static slicing of threaded programs. PASTE ’98, pp. 35–42.
Krinke, J. (2002). Evaluating context-sensitive slicing and chopping. International conference on software maintenance, pp. 22–31.
Krinke, J. (2003a). Barrier slicing and chopping. In IEEE Workshop on Source Code Analysis and Manipulation (SCAM).
Krinke, J. (2003b). Context-sensitive slicing of concurrent programs. Proc. ESEC/FSE’03, pp. 178–187.
Krinke, J. (2003c). Advanced slicing of sequential and concurrent programs. PhD thesis, Universität Passau.
Liu, H., & Kuan Tan, H. B. (2008). An approach for the maintenance of input validation. Information Software Technology, 50(5), 449–461.
Müller-Olm, M., & Seidl, H. (2001). On optimal slicing of parallel programs. STOC 2001 (33th ACM symposium on theory of computing), pp. 647–656.
Nanda, M. G., & Ramesh, S. (2000). Slicing concurrent programs. ISSTA 2000, pp. 180–190.
Nanda, M. G., & Ramesh, S. (2006). Interprocedural slicing of multithreaded programs with applications to Java. ACM TOPLAS., 28(6), 1088–1144.
Naumovich, G., Avrunin, G. S., & Clarke, L. A. (1999). An efficient algorithm for computing MHP information for concurrent Java programs. In Proc. ESEC/FSE ’99, pp. 338–354. Springer.
Qi, X., & Xu, B. (2005). An approach to slicing concurrent Ada programs based on program reachability graphs. IJCSNS, 6(1), 29–37.
Ramalingam, G. (2000). Context-sensitive synchronization-sensitive analysis is undecidable. ACM Transactions on Program Language Systems, 22(2), 416–430.
Reps, T., & Rosay, G. (1995). Precise interprocedural chopping. In Proceedings of FSE’95 (pp. 41–52). New York: ACM Press.
Ruf, E. (2000). Effective synchronization removal for Java. Programming Language Design and Implementation (PLDI), pp. 208–218.
Shacham, O., Sagiv, M., & Schuster, A. (2007). Scaling model checking of dataraces using dynamic information. Journal of Parallel and Distributed Computing 67(5), 536–550.
Snelting, G., Robschink, T., & Krinke, J. (2006). Efficient path conditions in dependence graphs for software safety analysis. ACM TOSEM, 15(4), 410–457.
Zhao, J. (1999). Slicing concurrent Java programs. Proceedings of the 7th IEEE International Workshop on Program Comprehension, pp. 126–133.
Author information
Authors and Affiliations
Corresponding author
Additional information
This is an extended version of previous work (Giffhorn 2009).
Rights and permissions
About this article
Cite this article
Giffhorn, D. Advanced chopping of sequential and concurrent programs. Software Qual J 19, 239–294 (2011). https://doi.org/10.1007/s11219-010-9114-7
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11219-010-9114-7