Advertisement

Solving demand versions of interprocedural analysis problems

  • Thomas Reps
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 786)

Abstract

This paper concerns the solution of demand versions of interprocedural analysis problems. In a demand version of a program-analysis problem, some piece of summary information (e.g., the dataflow facts holding at a given point) is to be reported only for a single program element of interest (or a small number of elements of interest). Because the summary information at one program point typically depends on summary information from other points, an important issue is to minimize the number of other points for which (transient) summary information is computed and/or the amount of information computed at those points. The paper describes how algorithms for demand versions of program-analysis problems can be obtained from their exhaustive counterparts essentially for free, by applying the so-called “magic-sets” transformation that was developed in the logic-programming and deductive-database communities.

Keywords

Logic Program Summary Information Deductive Database Call Site Valid Path 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

References

  1. 1.
    Allen, F.E., “Interprocedural data flow analysis,” pp. 398–408 in Information Processing 74: Proceedings of the IFIP Congress 74, ed. J.L. Rosenfield, North-Holland, Amsterdam (1974).Google Scholar
  2. 2.
    Babich, W.A. and Jazayeri, M., “The method of attributes for data flow analysis: Part II. Demand analysis”, Acta Informatica 10(3) pp. 265–272 (October 1978).Google Scholar
  3. 3.
    Bancilhon, F., Maier, D., Sagiv, Y., and Ullman, J., “Magic sets and other strange ways to implement logic programs,” in Proceedings of the Fifth ACM Symposium on Principles of Database Systems, (1986).Google Scholar
  4. 4.
    Bancilhon, F. and Ramakrishnan, R., “Performance evaluation of data intensive logic programs,” pp. 439–517 in Foundations of Deductive Databases and Logic Programming, ed. J. Minker, Morgan-Kaufmann (1988).Google Scholar
  5. 5.
    Banning, J.P., “An efficient way to find the side effects of procedure calls and the aliases of variables”, pp. 29–41 in Conference Record of the Sixth ACM Symposium on Principles of Programming Languages, (San Antonio, TX, Jan. 29–31, 1979), ACM, New York, NY (1979).Google Scholar
  6. 6.
    Barth, J.M., “A practical interprocedural data flow analysis algorithm”, Commun. of the ACM 21(9) pp. 724–736 (September 1978).CrossRefGoogle Scholar
  7. 7.
    Beeri, C. and Ramakrishnan, R., “On the power of magic,” pp. 269–293 in Proceedings of the Sixth ACM Symposium on Principles of Database Systems, (San Diego, CA, March 1987), (1987).Google Scholar
  8. 8.
    Callahan, D., “The program summary graph and flow-sensitive interprocedural data flow analysis”, Proceedings of the ACM SIGPLAN 88 Conference on Programming Language Design and Implementation, (Atlanta, GA, June 22–24, 1988), ACM SIGPLAN Notices 23(7) pp. 47–56 (July 1988).Google Scholar
  9. 9.
    Callahan, D., Carle, A., Hall, M.W., and Kennedy, K., “Constructing the procedure call multigraph”, IEEE Transactions on Software Engineering SE-16(4) pp. 483–487 (April 1990).CrossRefGoogle Scholar
  10. 10.
    Cooper, K.D. and Kennedy, K., “Interprocedural side-effect analysis in linear time,” Proceedings of the ACM SIGPLAN 88 Conference on Programming Language Design and Implementation, (Atlanta, GA, June 22–24, 1988), ACM SIGPLAN Notices 23(7) pp. 57–66 (July 1988).Google Scholar
  11. 11.
    Cooper, K.D. and Kennedy, K., “Fast interprocedural alias analysis”, pp. 49–59 in Conference Record of the Sixteenth ACM Symposium on Principles of Programming Languages, (Austin, TX, Jan. 11–13, 1989), ACM, New York, NY (1989).Google Scholar
  12. 12.
    Duesterwald, E., Gupta, R., and Soffa, M.L., “Demand-driven program analysis”, Technical Report TR-93-15, Department of Computer Science, University of Pittsburgh, Pittsburgh, PA (October 1993).Google Scholar
  13. 13.
    Horwitz, S. and Teitelbaum, T., “Generating editing environments based on relations and attributes”, ACM Trans. Program. Lang. Syst. 8(4) pp. 577–608 (October 1986).CrossRefGoogle Scholar
  14. 14.
    Horwitz, S., Reps, T., and Binkley, D., “Interprocedural slicing using dependence graphs”, ACM Trans. Program. Lang. Syst. 12(1) pp. 26–60 (January 1990).CrossRefGoogle Scholar
  15. 15.
    Knoop, J. and Steffen, B., “The interprocedural coincidence theorem”, pp. 125–140 in Proceedings of the Fourth International Conference on Compiler Construction, (Paderborn, FRG, October 5–7, 1992), Lecture Notes in Computer Science, Vol. 641, ed. U. Kastens and P. Pfahler, Springer-Verlag, New York, NY (1992).Google Scholar
  16. 16.
    Lakhotia, A., “Constructing call multigraphs using dependence graphs”, pp. 273–284 in Conference Record of the Twentieth ACM Symposium on Principles of Programming Languages,(Charleston, SC, Jan. 11–13, 1993), ACM, New York, NY (1993).Google Scholar
  17. 17.
    Landi, W. and Ryder, B.G., “Pointer-induced aliasing: A problem classification”, pp. 93–103 in Conference Record of the Eighteenth ACM Symposium on Principles of Programming Languages, (Orlando, FL, January 1991), ACM, New York, NY (1991).Google Scholar
  18. 18.
    Linton, M.A., “Implementing relational views of programs,” Proceedings of the ACM SIGSOFT/SIGPLAN Software Engineering Symposium on Practical Software Development Environments, (Pittsburgh, PA, Apr. 23–25, 1984), ACM SIGPLAN Notices 19(5) pp. 132–140 (May 1984).Google Scholar
  19. 19.
    Masinter, L.M., “Global program analysis in an interactive environment”, Tech. Rep. SSL-80-1, Xerox Palo Alto Research Center, Palo Alto, CA (January 1980).Google Scholar
  20. 20.
    Myers, E., “A precise inter-procedural data flow algorithm”, pp. 219–230 in Conference Record of the Eighth ACM Symposium on Principles of Programming Languages, (Williamsburg, VA, January 26–28, 1981), ACM, New York, NY (1981).Google Scholar
  21. 21.
    Ramakrishnan, R., Seshadri, P., Srivastava, D., and Sudarshan, S., “Coral pre-Release 1.0”, Software system, Computer Sciences Department, University of Wisconsin, Madison, WI (1993). (Available via ftp from ftp.cs.wisc.edu.)Google Scholar
  22. 22.
    Rohmer, R., Lescoeur, R., and Kersit, J.-M., “The Alexander method, a technique for the processing of recursive axioms in deductive databases”, New Generation Computing 4(3) pp. 273–285 (1986).Google Scholar
  23. 23.
    Sharir, M. and Pnueli, A., “Two approaches to interprocedural data flow analysis”, pp. 189–233 in Program Flow Analysis: Theory and Applications, ed. S.S. Muchnick and N.D. Jones, Prentice-Hall, Englewood Cliffs, NJ (1981).Google Scholar
  24. 24.
    Warren, D.S., “Memoing for logic programs”, Commun. of the ACM 35(3) pp. 93–111 (March 1992).CrossRefGoogle Scholar
  25. 25.
    Warren, D.S., “XSB Logic Programming System”, Software system, Computer Science Department, State University of New York, Stony Brook, NY (1993). (Available via ftp from sbcs.sunysb.edu.)Google Scholar
  26. 26.
    Weiser, M., “Program slicing”, IEEE Transactions on Software Engineering SE-10(4) pp. 352–357 (July 1984).Google Scholar
  27. 27.
    Zadeck, F.K., “Incremental data flow analysis in a structured program editor,” Proceedings of the SIGPLAN 84 Symposium on Compiler Construction, (Montreal, Can., June 20–22, 1984), ACM SIGPLAN Notices 19(6) pp. 132–143 (June 1984).Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1994

Authors and Affiliations

  • Thomas Reps
    • 1
  1. 1.Datalogisk InstitutUniversity of CopenhagenCopenhagen EastDenmark

Personalised recommendations