This Article 
   
 Share 
   
 Bibliographic References 
   
 Add to: 
 
Digg
Furl
Spurl
Blink
Simpy
Google
Del.icio.us
Y!MyWeb
 
 Search 
   
Program Slicing with Dynamic Points-To Sets
August 2005 (vol. 31 no. 8)
pp. 657-678
Markus Mock, IEEE Computer Society
Darren C. Atkinson, IEEE Computer Society
Program slicing is a potentially useful analysis for aiding program understanding. However, in reality even slices of small programs are often too large to be useful. Imprecise pointer analyses have been suggested as one cause of this problem. In this paper, we use dynamic points-to data, which represents optimistic pointer information, to obtain a bound on the best case slice size improvement that can be achieved with improved pointer precision. Our experiments show that slice size can be reduced significantly for programs that make frequent use of calls through function pointers because for them the dynamic pointer data results in a considerably smaller call graph, which leads to fewer data dependences. Programs without or with only few calls through function pointers, however, show considerably less improvement. We discovered that C programs appear to have a significant fraction of direct and nonspurious pointer data dependences so that reducing spurious dependences via pointers is only of limited benefit. Consequently, to make slicing useful in general for such programs, improvements beyond better pointer analyses will be necessary. On the other hand, since we show that collecting dynamic function pointer information can be performed with little overhead (average slowdown of 10 percent for our benchmarks), dynamic pointer information may be a practical approach to making slicing of programs with frequent function pointer use more successful in practice.

[1] D. Binkley and K.B. Gallagher, “Program Slicing,” Advances in Computers, pp. 1-50, Aug. 1996.
[2] D. Binkley and M. Harman, “A Survey of Empirical Results on Program Slicing,” Advances in Computers, 2004.
[3] S. Horwitz, T. Reps, and D. Binkley, “Interprocedural Slicing Using Dependence Graphs,” ACM Trans. Programming Languages and Systems, vol. 12, pp. 26-60, Jan. 1990.
[4] F. Tip, “A Survey of Program Slicing Techniques,” J. Programming Language, vol. 3, pp. 121-189, Sept. 1995.
[5] M. Weiser, “Program Slicing,” IEEE Trans. Software Eng., vol. 10, no. 7, pp. 352-357, July 1984.
[6] M.A. Francel and S. Rugaber, “The Value of Slicing While Debugging,” Proc. Seventh Int'l Workshop Program Comprehension, pp. 151-169, May 2001.
[7] K.B. Gallagher and J.R. Lyle, “Using Program Slicing in Software Maintenance,” IEEE Trans. Software Eng., vol. 17, pp. 751-761, Aug. 1991.
[8] J.R. Lyle, D.R. Graham, K.B. Gallagher, J.E. Poole, and D.W. Binkley, “A CASE Tool to Evaluate Functional Diversity in High Integrity Software,” Technical Report NIST IR-5691, Nat'l Inst. of Standards and Technology, Gaithersburg, Md., 1995.
[9] F. Tip and T.B. Dinesh, “A Slicing-Based Approach for Locating Type Errors,” ACM Trans. Software Eng. Methodology, vol. 10, pp. 5-55, Jan. 2001.
[10] D.C. Atkinson and W.G. Griswold, “Effective Whole-Program Analysis in the Presence of Pointers,” Proc. Sixth ACM Int'l Symp. Foundations of Software Eng., pp. 46-55, Nov. 1998.
[11] GrammaTech, Inc., Codesurfer User Guide and Reference Manual. 2000.
[12] M.J. Harrold and N. Ci, “Reuse-Driven Interprocedural Slicing,” Proc. 20th Int'l Conf. Software Eng., pp. 74-83, Apr. 1998.
[13] M. Das, “Unification-Based Pointer Analysis with Directional Assignments,” Proc. 2000 ACM SIGPLAN Conf. Programming Language Design and Implementation, pp. 35-46, June 2000.
[14] M. Shapiro and S. Horwitz, “Fast and Accurate Flow-Insensitive Points-To Analysis,” Proc. 24th ACM Symp. Principles of Programming Languages, pp. 1-14, Jan. 1997.
[15] D. Liang and M.J. Harrold, “Efficient Points-To Analysis for Whole-Program Analysis,” Proc. Seventh European Software Eng. Conf. and ACM Symp. Foundations of Software Eng., pp. 199-215, Sept. 1999.
[16] B. Steensgaard, “Points-To Analysis in Almost Linear Time,” Proc. 23rd ACM Symp. Principles of Programming Languages, pp. 32-41, Jan. 1996.
[17] N. Heintze and O. Tardieu, “Ultra-Fast Aliasing Analysis Using CLA: A Million Lines of C Code in a Second,” Proc. 2001 ACM SIGPLAN Conf. Programming Language Design and Implementation, pp. 254-263, June 2001.
[18] A. Diwan, K.S. McKinley, and J.F. B. Moss, “Type-Based Alias Analysis,” Proc. 1998 ACM SIGPLAN Conf. Programming Language Design and Implementation, pp. 106-117, June 1998.
[19] J. Whaley and M.S. Lam, “Cloning-Based Context-Sensitive Pointer Alias Analysis Using Binary Decision Diagrams,” Proc. 2004 ACM SIGPLAN Conf. Programming Language Design and Implementation, pp. 131-144, June 2004.
[20] M. Berndl, O. Lhoták, F. Qian, L. Hendren, and N. Umanee, “Points-To Analysis Using BDDs,” Proc. 2003 ACM SIGPLAN Conf. Programming Language Design and Implementation, pp. 103-114, June 2003.
[21] M. Mock, M. Das, C. Chambers, and S.J. Eggers, “Dynamic Points-To Sets: A Comparison with Static Analyses and Potential Applications in Program Understanding and Optimization,” Proc. 2001 ACM SIGPLAN-SIGSOFT Workshop Program Analysis for Software Tools and Eng., pp. 66-72, June 2001.
[22] L.O. Andersen, “Program Analysis and Specialization for the C Programming Language,” PhD thesis, Univ. of Copenhagen, Dept. of Computer Science, May 1994.
[23] M. Hind and A. Pioli, “Which Pointer Analysis Should I Use?” Proc. ACM SIGSOFT 2000 Int'l Symp. Software Testing and Analysis, pp. 113-123, Sept. 2000.
[24] H.D. Pande, W.A. Landi, and B.G. Ryder, “Interprocedural Def-Use Associations for C Systems with Single Level Pointers,” IEEE Trans. Software Eng., vol. 20, no. 5, pp. 385-403, May 1994.
[25] B.G. Ryder, W. Landi, P. Stocks, S. Zhang, and R. Altucher, “A Schema for Interprocedural Side Effect Analysis with Pointer Aliasing,” ACM Trans. Programming Languages and Systems, vol. 23, pp. 105-186, Mar. 2001.
[26] D.C. Atkinson and W.G. Griswold, “Implementation Techniques for Efficient Data-Flow Analysis of Large Programs,” Proc. 2001 Int'l Conf. Software Maintenance, pp. 52-61, Nov. 2001.
[27] M. Mock, M. Berryman, C. Chambers, and S.J. Eggers, “Calpa: A Tool for Automating Dynamic Compilation,” Proc. Second Workshop Feedback-Directed Optimization, pp. 100-109, Nov. 1999.
[28] M. Mock, C. Chambers, and S.J. Eggers, “Calpa: A Tool for Automating Selective Dynamic Compilation,” Proc. 33rd Ann. Symp. Microarchitecture, pp. 291-302, Dec. 2000.
[29] D. Liang and M.J. Harrold, “Reuse-Driven Interprocedural Slicing in the Presence of Pointers and Recursion,” Proc. 1999 Int'l Conf. Software Maintenance, pp. 421-432, Aug. 1999.
[30] M. Shapiro and S. Horwitz, “The Effects of the Precision of Pointer Analysis,” Proc. Fourth Int'l Symp. Static Analysis, pp. 16-34, Jan. 1997.
[31] D.C. Atkinson, “ The Design and Implementation of Practical and Task-Oriented Whole-Program Analysis Tools,” PhD thesis, Dept. of Computer Science and Eng., Univ. of California, San Diego, Apr. 1999.
[32] R. Cytron, J. Ferrante, B.K. Rosen, M.N. Wegman, and F.K. Zadeck, “Efficiently Computing Static Single Assignment Form and the Control Dependence Graph,” ACM Trans. Programming Languages and Systems, vol. 13, pp. 451-490, Oct. 1991.
[33] D.C. Atkinson and W.G. Griswold, “The Design of Whole-Program Analysis Tools,” Proc. 18th Int'l Conf. Software Eng., pp. 16-27, Mar. 1996.
[34] L. Bent, D.C. Atkinson, and W.G. Griswold, “A Comparative Study of Two Whole Programs Slicers for C,” Computer Science Technical Report CS2001-0668, Dept. of Computer Science and Eng., University of California, San Diego, 2001.
[35] B. Korel and J. Laski, “Dynamic Program Slicing,” Information Processing Letters, vol. 29, pp. 155-163, Oct. 1988.
[36] B. Korel and S. Yalamanchili, “Forward Computation of Dynamic Program Slices,” Proc. ACM SIGSOFT 1994 Int'l Symp. Software Testing and Analysis, pp. 66-79, Aug. 1994.
[37] G.A. Venkatesh, “Experimental Results from Dynamic Slicing of C Programs,” ACM Trans. Programming Languages and Systems, vol. 17, no. 2, pp. 197-216, 1995.
[38] X. Zhang, R. Gupta, and Y. Zhang, “Efficient Forward Computation of Dynamic Slices Using Reduced Ordered Binary Decision Diagrams,” Proc. 26th Int'l Conf. Software Eng., pp. 502-511, May 2004.
[39] M.U. Mock, “Automating Selective Dynamic Compilation,” PhD thesis, Dept. of Computer Science and Eng., Univ. of Washington, Aug. 2002.
[40] R.P. Wilson, R.S. French, C.S. Wilson, S.P. Amarasinghe, J.M. Anderson, S.W. K. Tjiang, S.-W. Liao, C.-W. Tseng, M.W. Hall, M.S. Lam, and J.L. Hennessy, “SUIF: An Infrastructure for Research on Parallelizing and Optimizing Compilers,” ACM SIGPLAN Notices, vol. 29, pp. 31-37, Dec. 1994.
[41] G. Holloway and C. Young, “The Flow and Analysis Libraries of Machine SUIF,” Proc. Second SUIF Compiler Workshop, Aug. 1997.
[42] S.L. Graham, P.B. Kessler, and M.K. McKusick, “gprof: A Call Graph Execution Profiler,” Proc. SIGPLAN '82 Symp. Compiler Construction, pp. 120-126, June 1982.
[43] MIPS Computer Systems, UMIPS-V Reference Manual (pixie and pixstats), Sunnyvale, Calif., 1990.
[44] A.V. Aho, R. Sethi, and J.D. Ullman, Compilers: Principles, Techniques, and Tools. Addison-Wesley, 1986.
[45] M. Mock, D.C. Atkinson, C. Chambers, and S.J. Eggers, “Improving Program Slicing With Dynamic Points-To Data,” Proc. 10th ACM Int'l Symp. Foundations of Software Eng., pp. 71-80, Nov. 2002.
[46] R. Ja, The Art of Computer Systems Performance Analysis: Techniques for Experimental Design, Measurement, Simulation, and Modeling. John Wiley and Sons, 1991.
[47] D. Binkley and M. Harman, “A Large-Scale Empirical Study of Forward and Backward Slice Size and Context Sensitivity,” Proc. 2003 Int'l Conf. Software Maintenance, pp. 44-53, Sept. 2003.
[48] J. Krinke, “Evaluating Context-Sensitive Slicing and Chopping,” Proc. 2002 Int'l Conf. Software Maintenance, pp. 22-31, Oct. 2002.
[49] O. Shivers, “Control-Flow Analysis of Higher-Order Languages,” PhD thesis, School of Computer Science, Carnegie Mellon Univ., May 1991.
[50] G.M. Amdahl, “Validity of the Single Processor Approach to Achieving Large Scale Computing Capabilities,” Proc. AFIPS 1967 Joint Computer Conf., pp. 483-485, Apr. 1967.
[51] D.C. Atkinson, “Accurate Call Graph Extraction of Programs with Function Pointers Using Type Signatures,” Proc. 11th Asia-Pacific Software Eng. Conf., pp. 326-335, Dec. 2004.
[52] S. Horwitz, T. Reps, and M. Sagiv, “Demand Interprocedural Dataflow Analysis,” Proc. Third ACM Symp. Foundations of Software Eng., pp. 104-115, Oct. 1995.
[53] D. Liang and M.J. Harrold, “Light-Weight Context Recovery for Efficient and Accurate Program Analyses,” Proc. 2000 Int'l Conf. Software Eng., pp. 366-375, June 2000.
[54] G. Agrawal and L. Guo, “Evaluating Explicitly Context-Sensitive Program Slicing,” Proc. 2001 ACM SIGPLAN-SIGSOFT Workshop Program Analysis for Software Tools and Eng., pp. 6-12, June 2001.
[55] A. Rountev and S. Chandra, “Off-Line Variable Substitution for Scaling Points-To Analyis,” Proc. 2000 ACM SIGPLAN Conf. Programming Language Design and Implementation, pp. 47-56, June 2000.
[56] A. Diwan, K.S. McKinley, and J.F. B. Moss, “Using Types to Analyze and Optimize Object-Oriented Programs,” ACM Trans. Programming Languages and Systems, vol. 23, pp. 30-72, Jan. 2001.
[57] P. Anderson, D. Binkley, G. Rosay, and T. Teitelbaum, “Flow Insensitive Points-To Sets,” Information and Software Technology, vol. 44, pp. 743-754, Oct. 2002.
[58] M. Fahndrich, J.S. Foster, S. Zhendong, and A. Aiken, “Partial Online Cycle Elimination In Inclusion Constraint Graphs,” Proc. 1998 ACM SIGPLAN Conf. Programming Language Design and Implementation, pp. 85-96, June 1998.
[59] D. Binkley and M. Harman, “Results from a Large-Scale Study of Performance Optimization Techniques for Source Code Analyses Based on Graph Reachability Algorithms,” Proc. Third IEEE Int'l Workshop Source Code Analysis and Manipulation, pp. 203-212, Sept. 2003.
[60] R. Ghiya and L.J. Hendren, “Putting Pointer Analysis to Work,” Proc. 1998 ACM SIGPLAN-SIGACT Symp. Principles of Programming Languages, pp. 121-133, Jan. 1998.
[61] R. Ghiya, D. Lavery, and D. Sehr, “On the Importance of Points-To Analysis and Other Memory Disambiguation Methods for C Programs,” Proc. 2001 ACM SIGPLAN Conf. Programming Language Design and Implementation, pp. 47-58, June 2001.

Index Terms:
Index Terms- Dynamic analysis, points-to analysis, program slicing.
Citation:
Markus Mock, Darren C. Atkinson, Craig Chambers, Susan J. Eggers, "Program Slicing with Dynamic Points-To Sets," IEEE Transactions on Software Engineering, vol. 31, no. 8, pp. 657-678, Aug. 2005, doi:10.1109/TSE.2005.94
Usage of this product signifies your acceptance of the Terms of Use.