This Article 
   
 Share 
   
 Bibliographic References 
   
 Add to: 
 
Digg
Furl
Spurl
Blink
Simpy
Google
Del.icio.us
Y!MyWeb
 
 Search 
   
Interprocedural Def-Use Associations for C Systems with Single Level Pointers
May 1994 (vol. 20 no. 5)
pp. 385-403

Def-use analysis links possible value-setting statements for a variable (i.e. definitions) to potential value-fetches (i.e. uses) of that value. This paper describes the first algorithm that calculates accurate interprocedural def-use associations in C software systems. Our algorithm accounts for program-point-specific pointer-induced aliases, though it is currently limited to programs using a single level of indirection. We prove the NP-hardness of the interprocedural reaching definitions problem and describe the approximations made by our polynomial-time algorithm. Initial empirical results are also presented.

[1] H. Agrawal and J.R. Horgan, "Dynamic Program Slicing,"ACM SIGPlan Notices, June 1990, pp. 246-256.
[2] A. V. Aho, R. Sethi, and J. D. Ullman,Compilers: Principles, Techniques, and Tools. Reading, MA: Addison-Wesley, 1986.
[3] J. P. Banning, "An efficient way to find the side effects of procedure calls and the aliases of variables," inProc. 6th POPL Conf., ACM, pp. 724-736, 1979.
[4] J. M. Barth, "A practical interprocedural dataflow analysis algorithm,"Comm. Assoc. Computing Machinery, vol. 21, no. 9, pp. 724-726, Sept. 1978.
[5] M. Burke, "An interval-based approach to exhaustive and incremental interprocedural data-flow analysis,"ACM Trans. Programming Languages Syst., vol. 12, pp. 341-395, July 1990.
[6] M. Burke and J.-D. Choi, "Precise and efficient integration of interprocedural alias information into data flow analysis,"ACM Lett. Programming Languages Syst., vol. 1, pp. 14-21, Mar. 1992.
[7] D. Callahan, "The program summary graph and flow-sensitive interprocedural data flow analysis," inProc. SIGPLAN '88 Conf. Programming Language Design and Implementation, June 1988, pp. 47-56.
[8] D. R. Chase, M. Wegman, and F. K. Zadeck, "Analysis of pointers and structures,"Proc. SIGPLAN'90 Conf. Programming Language Design and Implementation, SIGPLAN Notices, vol. 25, no. 6, pp. 296-310, June 1990.
[9] J.-D. Choi, M. Burke, and P. Carini, "Efficient flow-sensitive interprocedural computation of pointer-induced aliases and side effects,"Conf. Record 20th Ann. ACM Symp. Principles of Programming Languages, 1993.
[10] A. Chow and A. Rudmik, "The design of a data flow analyzer,"Proc. ACM SIGPLAN Symp. Compiler Construction, 1982, pp. 106-113.
[11] B. G. Cooper, "Ambitious data flow analysis of procedural programs," M.S. thesis, Univ. of Minn., May 1989.
[12] K. Cooper and K. Kennedy, "Interprocedural side-effect analysis in linear time," inProc. ACM SIGPLAN '88 Conf. Program Language Design Implementation, Atlanta, GA, June 1988.
[13] K. Cooper and K. Kennedy, "Fast interprocedural alias analysis," in Proc. Sixteenth Annu.ACM Symp. Principles of Programming Languages, Jan. 1989, pp. 49-59.
[14] D. S. Coutant, "Retargetable high-level alias analysis,"Conf. Rec. 13th Ann. ACM Symp. Principles Programming Languages, 1986, pp. 110-118.
[15] A. Deutsch, "On determining lifetime and aliasing of dynamically allocated data in higher-order functional specifications,"Conf. Rec. 17th Ann. ACM Symp. Principles of Programming Languages, 1990, pp. 157-168.
[16] P. Frankl and E. Weyuker, "An applicable family of data flow testing criteria,"IEEE Trans. Software Eng., vol. 14, pp. 1483-1498, Oct. 1988.
[17] T. Goradia, "Dynamic impact analysis: A cost effective technique to enforce error propagation,"Proc. 1993 Int. Symp. Software Testing and Analysis, 1993, pp. 171-181.
[18] C. A. Guarna, "A technique for analyzing pointer and structure references in parallel restructuring compilers,"Proc. Int. Conf. Parallel Processing, 1988, pp. 212-220.
[19] W. L. Harrison III and Z. Ammarguellat, "The design of parallelizers for symbolic and numeric programs," inProc. 2nd U.S.-Japan Workshop on Parallel Lisp, T. Ito and R. Halstead, Eds., June 1989.
[20] M. J. Harrold and M. L. Soffa, "Interprocedural data flow testing,"Proc. Software Testing, Analysis, and Verification Symp., 1989, pp. 158-167.
[21] M. J. Harrold and M. L. Soffa, "Computation of interprocedural definition and use dependencies," inProc. IEEE Comput. Soc. 1990 Int. Conf. Comput. Languages, New Orleans, LA, Mar. 1990, pp. 297-306.
[22] M. J. Harrold and M. L. Soffa, "Selecting and using data for integration testing,"IEEE Software, vol. 8, pp. 58-65, Mar. 1991.
[23] M. Hecht,Flow Analysis of Computer Programs. New York: Elsevier North-Holland, 1977.
[24] L. Hendren, J. Hummel, and A. Nicolau, "Abstractions for recursive pointer data structures: Improving analysis and transformations of imperative languages,"Proc. SIGPLAN'92 Conf. Programming Language Design and Implementation, SIGPLAN Notices, vol. 27, no. 6, pp. 249-260, June 1992.
[25] L. Hendren and A. Nicolau, "Parallelizing programs with recursive data structures,"IEEE Trans. Parallel Distrib. Syst., 1990.
[26] S. Horwitz, P. Pfeiffer, and T. Reps, "Dependence analysis for pointer variables," inProc. SIGPLAN '89 Conf. Program. Lang. Design and Implement., June 1989, pp. 28-40.
[27] S. Horowitz, J. Prins, and T. Reps, "Integrating non-interfering versions of programs,"Trans. Program. Lang. Syst., vol. 11, no. 3, pp. 345-387, July 1989.
[28] S. Horwitz, T. Reps, and D. Binkley, "Interprocedural slicing using dependence graphs,"ACM Trans. Programming Languages and Systems, vol. 12, no. 1, pp. 35-46, Jan. 1990.
[29] N. Jones and S. Muchnick, "Flow analysis and optimization of lisp-like structures," inProgram Flow Analysis: Theory and Applications, S. Muchnick and N. Jones, Eds. Englewood Cliffs, NJ: Prentice-Hall, 1979, pp. 102-131.
[30] B. Korel and J. Laski, "Dynamic slicing of computer programs,"J. Syst. Software, vol. 13, pp. 187-195, 1990.
[31] W. Landi, "Interprocedural Aliasing in the Presence of Pointers," Ph.D. dissertation, Tech. Rep. LCSR-TR-174, Rutgers Univ., 1992.
[32] W. Landi, "Undecidability of static analysis,"ACM Lett. Programming Languages Syst., vol. 1, pp. 323-337, Dec. 1992
[33] W. Landi and B. G. Ryder, "Pointer-induced aliasing: A problem classification,"Conf. Rec. 18th Ann. ACM Symp. Principles of Programming Languages, 1991, pp. 93-103.
[34] W. Landi and B. G. Ryder, "A safe approximate algorithm for interprocedural pointer aliasing,"Proc. ACM SIGPLAN '92 Conf. Programming Language Design and Implementation, 1992, pp. 235-248.
[35] W. Landi, B. G. Ryder, and S. Zhang, "Interprocedural modification side effect analysis with pointer aliasing,"Proc. SIGPLAN'93 Conf. Programming Language Design and Implementation, 1993, pp. 56-67.
[36] J. R. Larus, "Restructuring Symbolic Programs for Concurrent Execution on Multiprocessors," Ph.D. dissertation, Univ. of Cal., Berkeley, May 1989.
[37] J. R. Larus and P. N. Hilfinger, "Detecting conflicts between structure accesses," inProc. SIGPLAN '88 Conf. Program. Lang. Design and Implement., June 1988, pp. 21-34.
[38] S.-S. Liu and A.-B. Taha, "Interprocedural definition--Use dependency analysis for recursive procedures," Tech. Rep. SERC-TR-42-F, Software Eng. Res. Center, Univ. of Fla., Gainesville, FL, 1990.
[39] D. Lomet, "Data flow analysis in the presence of procedure calls,"J. Res. Dev., vol. 21, no. 6, pp. 559-571, Nov. 1977.
[40] T. J. Marlowe, W. A. Landi, B. G. Ryder, J. Choi, M. Burke, and P. Carini, "Pointer-induce aliasing: A clarification,"ACM SIGPLAN Notices, vol. 28, Sept. 1993.
[41] T. J. Marlowe and B. G. Ryder, "Properties of dataflow frameworks,"Acta Informatica, vol. 28, pp. 121-163, 1990.
[42] E.W. Myers, "A Precise Interprocedural Dataflow Algorithm,"Conf. Rec. Ann. Symp. Principles of Programming Languages, ACM, New York, 1981, pp. 219-230.
[43] A. Neirynck, P. Panangaden, and A. J. Demers, "Computation of aliases and support sets," inProc. 14th ACM Symp. Principles Program. Lang., 1987, pp. 274-283.
[44] T. J. Ostrand and E. Weyuker, "Data flow based test adequecy analysis for languages with pointers,"Proc. 1991 Symp. Software Testing, Analysis and Verification (TAV4), Oct. 1991, pp. 74-86.
[45] T. J. Ostrand, "Data-flow testing with pointers and function calls,"Proc. Pac. Northwest Software Quality Conf., 1990.
[46] K. Ottenstein and L. Ottenstein, "The program dependence graph in software development environments,"ACM SIGPLAN Notices, vol. 19, no. 5, pp. 177-184, May 1984; see also,Proc. ACM SIGSOFT/SIGPLAN Software Eng. Symp. Practical Software Development Environments.
[47] H. Pande, B. G. Ryder, and W. Landi, "Interprocedural def-use associations for C programs,"Proc. ACM SIGSOFT Conf. on Testing, Analysis and Validation, 1991, pp. 139-153.
[48] H. D. Pande, "Static Analysis in the Presence of Pointers," Ph.D. dissertation, Rutgers Univ., 1994 (in preparation).
[49] H. D. Pande and B. G. Ryder, "Static type determination for c++," Laboratory for Computer Science Research Tech. Rep. LCSR-TR-197-A, Dept. of Comput. Sci., Rutgers Univ., 1994 (also available as TRDDC Tech. Rep. TP-93-01).
[50] M. Platoff, M. Wagner, and J. Camaratta, "An integrated program representation and toolkit for the maintenance of C programs,"Proc. Conf. on Software Maintenance, 1991, pp. 129-137.
[51] S. Rapps and E. J. Weyuker, "Selecting software test data using data flow information,"IEEE Trans. Software Eng., vol. SE-11, no. 4, pp. 367-375, Apr. 1985.
[52] C. Ruggieri and T. P. Murtagh, "Lifetme analysis of dynamically allocated objects," inProc. 15th ACM Symp. Principles Program. Lang., 1988, pp. 285-293.
[53] B. G. Ryder, "An application of static program analysis to software maintenance,"Proc. 20th Haw. Int. Conf. Syst. Sci., Vol. II, Software, 1987, pp. 82-91.
[54] B. Ryder, "ISMM: Incremental software maintenance manager,"Proc. Conf. Software Maintenance, 1989, pp. 142-164.
[55] B. G. Ryder and M. D. Carroll, "An incremental algorithm for software analysis,"Proc. ACM SIGSOFT/SIGPLAN Software Eng. Symp. Practical Software Dev. Environments, 1986, pp. 171-179.
[56] B. G. Ryder, W. Landi, and H. Pande, "Profiling an incremental data flow analysis algorithm,"IEEE Trans. Software Eng., vol. 16, pp. 129-140, Feb. 1990.
[57] G. A. Venkatesh, "The semantic approach to program slicing,"Proc. SIGPLAN'91 Conf. Programming Language Design and Implementation, 1991, pp. 107-119.
[58] W. E. Weihl, "Interprocedural data flow analysis in the presence of pointers, procedure variables and label variables,"Conf. Rec. 7th Ann. ACM Symp. Principles of Programming Languages, 1980, pp. 83-94.
[59] M. Weiser, "Program slicing,"IEEE Trans. Software Eng., vol. SE- 10(4), pp. 352-357, July 1984.
[60] W. Yang, S. Horwitz, and T. Reps, "A program integration algorithm that accommodates semantics preserving transformations,"Proc. 4th ACM SIGSOFT Symp. Software Dev. Environments, pp. 133-143, Dec. 1990.

Index Terms:
computational complexity; C language; program compilers; program diagnostics; software engineering; data structures; interprocedural def-use associations; C software systems; single level pointers; value-setting statements; value-fetches; program-point-specific pointer-induced aliases; indirection; NP-hardness; interprocedural reaching definitions problem; polynomial-time algorithm; static analysis
Citation:
H.D. Pande, W.A. Landi, B.G. Ryder, "Interprocedural Def-Use Associations for C Systems with Single Level Pointers," IEEE Transactions on Software Engineering, vol. 20, no. 5, pp. 385-403, May 1994, doi:10.1109/32.286418
Usage of this product signifies your acceptance of the Terms of Use.