This Article 
   
 Share 
   
 Bibliographic References 
   
 Add to: 
 
Digg
Furl
Spurl
Blink
Simpy
Google
Del.icio.us
Y!MyWeb
 
 Search 
   
Analysis and Visualization of Predicate Dependence on Formal Parameters and Global Variables
November 2004 (vol. 30 no. 11)
pp. 715-735
Empirical data concerning the qualitative and quantitative nature of program dependence is presented for a set of 20 programs ranging from 600 lines of code to 167,000 lines of code. The sources of dependence considered are global variables and formal parameters and the targets considered are a program's predicate nodes. The results show that as the number of formal parameters available to a predicate increases, there is a decrease in the proportion of these formal parameters which are depended upon by the predicate. No such correlation was found for global variables. Results from theoretical and actual computation time analysis indicate that the computation of dependence information is practical, suggesting that the analysis may be beneficial to several application areas. The paper also presents results concerning correlations that provide strong evidence that the global and formal dependence sources are independent of one another and that the numbers of globals and formals are independent of the size of the procedure that contains them. Finally, two visualization techniques for displaying dependence information are introduced. Illustrations show how these visualizations and predicate dependence analysis can assist in activities such as testing, comprehension, and evolution.

[1] H. Agrawal, “On Slicing Programs with Jump Statements,” Proc. ACM SIGPLAN Conf. Programming Language Design and Implementation, pp. 302-312, June 1994.
[2] L.O. Andersen, “Program Analysis and Specialization for the C Programming Language,” PhD thesis, DIKU, Univ. of Copenhagen, May 1994.
[3] D.C. Atkinson and W.G. Griswold, “Effective Whole-Program Analysis in the Presence of Pointers,” Proc. ACM SIGSOFT Sixth Int'l Symp. Foundations of Software Eng. (FSE '98), pp. 46-55, Nov. 1998.
[4] T. Ball and S.G. Eick, “Visualizing Program Slices,” Proc. Symp. Visual Languages, A.L. Ambler and T.D. Kimura, eds., pp. 288-295, Oct. 1994.
[5] T. Ball and S. Horwitz, “Slicing Programs with Arbitrary Control-Flow,” Proc. First Conf. Automated Algorithmic Debugging, P. Fritzson, ed., pp. 206-222, 1993.
[6] F. Balmas, “Using Dependence Graphs as a Support to Document Programs,” Proc. Second IEEE Int'l Workshop Source Code Analysis and Manipulation, pp. 145-154, Oct. 2002.
[7] J.M. Bieman and L.M. Ott, “Measuring Functional Cohesion,” IEEE Trans. Software Eng., vol. 20, no. 8, pp. 644-657, Aug. 1994.
[8] D.W. Binkley and K.B. Gallagher, “Program Slicing,” Advances in Computing, Volume 43, M. Zelkowitz, ed., pp. 1-50, 1996.
[9] D.W. Binkley and M. Harman, “An Empirical Study of Predicate Dependence Levels and Trends,” Proc. 25th IEEE Int'l Conf. Software Eng. (ICSE 2003), pp. 330-339, May 2003.
[10] D.W. Binkley and M. Harman, “Results from a Large-Scale Study of Performance Optimization Techniques for Source Code Analyses Based on Graph Reachability Algorithms,” Proc. IEEE Int'l Workshop Source Code Analysis and Manipulation (SCAM 2003), pp. 203-212, Sept. 2003.
[11] D.W. Binkley and M. Harman, “A Survey of Empirical Results on Program Slicing,” Advances in Computers, vol. 62, pp. 105-178, 2004.
[12] D.W. Binkley, M. Harman, L.R. Raszewski, and C. Smith, “An Empirical Study of Amorphous Slicing as a Program Comprehension Support Tool,” Proc. Eighth IEEE Int'l Workshop Program Comprehension (IWPC 2000), pp. 161-170, June 2000.
[13] G. Canfora, A. Cimitile, and A. DeLucia, “Conditioned Program Slicing,” Information and Software Technology, special issue on program slicing, M. Harman and K. Gallagher, eds., vol. 40, pp. 595-607, 1998.
[14] J.-D. Choi and J. Ferrante, “Static Slicing in the Presence of Goto Statements,” ACM Trans. Programming Languages and Systems, vol. 16, no. 4, pp. 1097-1113, July 1994.
[15] A. DeLucia, A.R. Fasolino, and M. Munro, “Understanding Function Behaviours through Program Slicing,” Proc. Fourth IEEE Workshop Program Comprehension, pp. 9-18, Mar. 1996.
[16] R. Ferguson and B. Korel, “The Chaining Approach for Software Test Data Generation,” ACM Trans. Software Eng. and Methodology, vol. 5, no. 1, pp. 63-86, Jan. 1996.
[17] K.B. Gallagher, “Evaluating the Surgeon's Assistant: Results of a Pilot Study,” Proc. Int'l Conf. Software Maintenance, pp. 236-244, Nov. 1992.
[18] Grammatech Inc., The codesurfer slicing system, 2002.
[19] M. Harman and S. Danicic, “Using Program Slicing to Simplify Testing,” Software Testing, Verification and Reliability, vol. 5, no. 3, pp. 143-162, Sept. 1995.
[20] M. Harman and S. Danicic, “A New Algorithm for Slicing Unstructured Programs,” J. Software Maintenance and Evolution, vol. 10, no. 6, pp. 415-441, 1998.
[21] M. Harman and R.M. Hierons, “An Overview of Program Slicing,” Software Focus, vol. 2, no. 3, pp. 85-92, 2001.
[22] M. Harman, L. Hu, R.M. Hierons, J. Wegener, H. Sthamer, A. Baresel, and M. Roper, “Testability Transformation,” IEEE Trans. Software Eng., vol. 30, no. 1 pp. 3-16, Jan. 2004.
[23] M. Harman, M. Okunlawon, B. Sivagurunathan, and S. Danicic, “Slice-Based Measurement of Coupling,” Proc. 19th ICSE Workshop Process Modelling and Empirical Studies of Software Evolution, R. Harrison, ed., May 1997.
[24] M.J. Harrold and N. Ci, “Reuse-Driven Interprocedural Slicing,” Proc. 20th Int'l Conf. Software Eng., pp. 74-83, Apr. 1998.
[25] R.M. Hierons, M. Harman, and S. Danicic, “Using Program Slicing to Assist in the Detection of Equivalent Mutants,” Software Testing, Verification and Reliability, vol. 9, no. 4, pp. 233-262, 1999.
[26] M. Hind, “Pointer Analysis— Haven't We Solved This Problem Yet?” Program Analysis for Software Tools and Eng. (PASTE '01), June 2001.
[27] J.H. Holland, Adaption in Natural and Artificial Systems. MIT Press, 1975.
[28] S. Horwitz, T. Reps, and D.W. Binkley, “Interprocedural Slicing Using Dependence Graphs,” Proc. ACM SIGPLAN Conf. Programming Language Design and Implementation, pp. 25-46, June 1988.
[29] S. Horwitz, T. Reps, and D.W. Binkley, “Interprocedural Slicing Using Dependence Graphs,” ACM Trans. Programming Languages and Systems, vol. 12, no. 1, pp. 26-61, 1990.
[30] S. Horwitz, T. Reps, and M. Sagiv, “Demand Interprocedural Dataflow Analysis,” Proc. SIGSOFT'95 Third ACM SIGSOFT Symp. Foundations of Software Eng. (FSE '95), pp. 104-115, Oct. 1995.
[31] B.F. Jones, H.-H. Sthamer, and D.E. Eyres, “Automatic Structural Testing Using Genetic Algorithms,” The Software Eng. J., vol. 11, pp. 299-306, 1996.
[32] B.F. Jones, D.E. Eyres, and H.H. Sthamer, “A Strategy for Using Genetic Algorithms to Automate Branch and Fault-Based Testing,” The Computer J., vol. 41, no. 2, pp. 98-107, 1998.
[33] R. Komondoor and S. Horwitz, “Semantics-Preserving Procedure Extraction,” Proc. 27th ACM SIGPLAN-SIGACT Symp. Principles of Programming Languages (POPL-00), pp. 155-169, Jan. 2000.
[34] R. Komondoor and S. Horwitz, “Effective Automatic Procedure Extraction,” Proc. 11th IEEE Int'l Workshop Program Comprehension, May 2003.
[35] B. Korel and J. Laski, “Dynamic Program Slicing,” Information Processing Letters, vol. 29, no. 3, pp. 155-163, Oct. 1988.
[36] B. Korel and J. Rilling, “Program Slicing in Understanding of Large Programs,” Proc. Sixth IEEE Int'l Workshop Program Comprenhesion (IWPC '98), pp. 145-152, 1998.
[37] J. Krinke, “Evaluating Context-Sensitive Slicing and Chopping,” Proc. IEEE Int'l Conf. Software Maintenance (ICSM 2002), pp. 22-31, Oct. 2002.
[38] S. Kumar and S. Horwitz, “Better Slicing of Programs with Jumps and Switches,” Proc. Fifth Int'l Conf. Fundamental Approaches to Software Eng. (FASE 2002), pp. 96-112, 2002.
[39] S. Kusumoto, A. Nishimatsu, K. Nishie, and K. Inoue, “Experimental Evaluation of Program Slicing for Fault Localization,” Empirical Software Eng., vol. 7, pp. 49-76, 2002.
[40] A. Lakhotia and J.-C. Deprez, “Restructuring Programs by Tucking Statements Into Functions,” Information and Software Technology Special Issue on Program Slicing, M. Harman and K. Gallagher, eds., vol. 40, pp. 677-689, 1998.
[41] A. Lakhotia and P. Singh, “Challenges in Getting Formal with Viruses,” Virus Bull., Sept. 2003.
[42] L.D. Larsen and M.J. Harrold, “Slicing Object-Oriented Software,” Proc. 18th Int'l Conf. Software Eng., pp. 495-505, 1996.
[43] D. Liang and M.J. Harrold, “Efficient Points-To Analysis for Whole-Program Analysis,” O. Nierstrasz and M. Lemoine, eds., Proc. Foundations on Software Eng., 1999.
[44] J.R. Lyle, D.R. Wallace, J.R. Graham, K.B. Gallagher, J.P. Poole, and D.W. Binkley, “Unravel: A CASE Tool to Assist Evaluation of High Integrity Software, Volume 1: Requirements and Design,” Technical Report NISTIR 5691, US Department of Commerce, Technology Administration, Nat'l Inst. of Standards and Technology, Computer Systems Laboratory, Gaithersburg, Md., 20899, 1995.
[45] J.R. Lyle and M. Weiser, “Automatic Program Bug Location by Program Slicing,” Proc. Second Int'l Conf. Computers and Applications, pp. 877-882, 1987.
[46] S. Mancoridis, B.S. Mitchell, Y.-F. Chen, and E.R. Gansner, “Bunch: A Clustering Tool for the Recovery and Maintenance of Software System Structures,” Proc. IEEE Int'l Conf. Software Maintenance, pp. 50-59, 1999.
[47] C.C. Michael, G. McGraw, and M.A. Schatz, “Generating Software Test Data by Evolution,” IEEE Trans. Software Eng., vol. 27, no. 12, pp. 1085-1110, Dec. 2001.
[48] M. Mitchell, An Introduction to Genetic Algorithms. MIT Press, 1996.
[49] M. Mock, D.C. Atkinson, C. Chambers, and S.J. Eggers, “Improving Program Slicing with Dynamic Points-To Data,” Proc. Tenth ACM SIGSOFT Symp. Foundations of Software Eng. (FSE '02), W.G. Griswold, ed., pp. 71-80, Nov. 2002.
[50] F. Mueller and J. Wegener, “A Comparison of Static Analysis and Evolutionary Testing for the Verification of Timing Constraints,” Proc. Fourth IEEE Real-Time Technology and Applications Symp. (RTAS '98), pp. 144-154, June 1998.
[51] J. Ning, A. Engberts, and V. Kozaczynski, “Automated Support for Legacy Code Understanding,” Comm. ACM, vol. 37, no. 5, pp. 50-57, 1994.
[52] A.J. Offutt, “An Integrated System for Automatically Generating Test Data,” Proc. First Int'l Conf. Systems Integration, R.T. Ng et al., eds., pp. 694-701, Apr. 1990.
[53] A.J. Offutt, Z. Jin, and J. Pan, “The Dynamic Domain Reduction Approach to Test Data Generation,” Software Practice and Experience, vol. 29, no. 2, pp. 167-193, Jan. 1999.
[54] A. Orso, S. Sinha, and M.J. Harrold, “Effects of Pointers on Data Dependences,” Proc. Ninth IEEE Int'l Workshop Program Comprehension (IWPC '01), pp. 39-49, May 2001.
[55] A. Orso, S. Sinha, and M.J. Harrold, “Incremental Slicing Based on Data-Dependences Types,” Proc. IEEE Int'l Conf. Software Maintenance (ICSM 2001), pp. 158-167, Nov. 2001.
[56] R.P. Pargas, M.J. Harrold, and R.R. Peck, “Test-Data Generation Using Genetic Algorithms,” The J. Software Testing, Verification and Reliability, vol. 9, pp. 263-282, 1999.
[57] H. Pohlheim and J. Wegener, “Testing the Temporal Behavior of Real-Time Software Modules Using Extended Evolutionary Algorithms,” Proc. Genetic and Evolutionary Computation Conf., W. Banzhaf et al., eds., vol. 2, p. 1795, July 1999.
[58] T. Reps, S. Horwitz, M. Sagiv, and G. Rosay, “Speeding Up Slicing,” Proc. ACM Foundations of Software Eng. (FSE '94), pp. 11-20, Dec. 1994.
[59] J. Rilling and S.P. Mudur, “On the Use of Metaballs to Visually Map Source Code Structures and Analysis Results onto 3D Space,” Proc. 10th Working Conf. Reverse Eng., pp. 42-52, Oct. 2002.
[60] A. Schultz, J. Grefenstette, and K. Jong, “Test and Evaluation by Genetic Algorithms,” IEEE Expert, vol. 8, no. 5, pp. 9-14, 1993.
[61] M. Shapiro and S. Horwitz, “The Effects of the Precision of Pointer Analysis,” Lecture Notes in Computer Science, vol. 1302, pp. 16-34, 1997.
[62] S. Sinha, M.J. Harrold, and G. Rothermel, “System-Dependence-Graph-Based Slicing of Programs with Arbitrary Interprocedural Control-Flow,” Proc. 21st Int'l Conf. Software Eng., pp. 432-441, May 1999.
[63] B. Steensgaard, “Points-To Analysis in Almost Linear Time,” Proc. Conf. Record of the 23rd ACM SIGPLAN-SIGACT Symp. Principles of Programming Languages (POPL '96), pp. 32-41, Jan. 1996.
[64] R.E. Tarjan, “Testing Flow Graph Reducibility,” J. Computer and System Sciences, vol. 9, no. 3, pp. 355-365, Dec. 1974.
[65] F. Tip, “A Survey of Program Slicing Techniques,” Technical Report CS-R9438, Centrum voor Wiskunde en Informatica, Amsterdam, 1994.
[66] F. Tip, “A Survey of Program Slicing Techniques,” J. Programming Languages, vol. 3, no. 3, pp. 121-189, Sept. 1995.
[67] N. Tracey, J. Clark, and K. Mander, “Automated Program Flaw Finding Using Simulated Annealing,” Proc. Int'l Symp. Software Testing and Analysis, pp. 73-81, Mar. 1998.
[68] N. Tracey, J. Clark, and K. Mander, “The Way Forward for Unifying Dynamic Test-Case Generation: The Optimisation-Based Approach,” Proc. Int'l Workshop Dependable Computing and Its Applications (DCIA), pp. 169-180, Jan. 1998.
[69] G.A. Venkatesh, “Experimental Results from Dynamic Slicing of C Programs,” ACM Trans. Programming Languages and Systems, vol. 17, no. 2, pp. 197-216, Mar. 1995.
[70] J. Wegener, A. Baresel, and H. Sthamer, “Evolutionary Test Environment for Automatic Structural Testing,” Information and Software Technology Special Issue on Software Eng. Using Metaheuristic Innovative Algorithms, vol. 43, no. 14, pp. 841-854, 2001.
[71] J. Wegener, K. Grimm, M. Grochtmann, H. Sthamer, and B.F. Jones, “Systematic Testing of Real-Time Systems,” Proc. Fourth Int'l Conf. Software Testing Analysis and Rev. (EuroSTAR 96), 1996.
[72] J. Wegener, H. Sthamer, B.F. Jones, and D.E. Eyres, “Testing Real-Time Systems Using Genetic Algorithms,” Software Quality, vol. 6, pp. 127-135, 1997.
[73] M. Weiser, “Program Slices: Formal, Psychological, and Practical Investigations of an Automatic Program Abstraction Method,” PhD thesis, Univ. of Michigan, Ann Arbor, 1979.
[74] M. Weiser, “Programmers Use Slicing When Debugging,” Comm. ACM, vol. 25, no. 7, pp. 446-452, July 1982.
[75] M. Weiser, “Program Slicing,” IEEE Trans. Software Eng., vol. 10, no. 4, pp. 352-357, 1984.
[76] S.H. Yong, S. Horwitz, and T. Reps, “Pointer Analysis for Programs with Structures and Casting,” Proc. SIGPLAN 99 Conf. Programming Language Design and Implementation, pp. 91-103, May 1999.
[77] J.-s. Yur, B.G. Ryder, and W.A. Landi, “An Incremental Flow- and Context-Sensitive Pointer Aliasing Analysis,” Proc. 21st Int'l Conf. Software Eng., pp. 442-452, May 1999.
[78] X. Zhang and R. Gupta, “Hiding Program Slices for Software Security,” Proc. First Ann. IEEE/ACM Int'l Symp. Code Generation and Optimization, pp. 325-336, Mar. 2003.
[79] X. Zhang, R. Gupta, and Y. Zhang, “Precise Dynamic Slicing Algorithms,” Proc. 25th IEEE Int'l Conf. and Software Eng. (ICSE 2003), pp. 319-329, May 2003.

Index Terms:
Dependence analysis, program slicing, program comprehension, software maintenance.
Citation:
David Binkley, Mark Harman, "Analysis and Visualization of Predicate Dependence on Formal Parameters and Global Variables," IEEE Transactions on Software Engineering, vol. 30, no. 11, pp. 715-735, Nov. 2004, doi:10.1109/TSE.2004.78
Usage of this product signifies your acceptance of the Terms of Use.