skip to main content
article
Free Access

Scalable context-sensitive flow analysis using instantiation constraints

Published:01 May 2000Publication History
Skip Abstract Section

Abstract

This paper shows that a type graph (obtained via polymorphic type inference) harbors explicit directional flow paths between functions. These flow paths arise from the instantiations of polymorphic types and correspond to call-return sequences in first-order programs. We show that flow information can be computed efficiently while considering only paths with well matched call-return sequences, even in the higher-order case. Furthermore, we present a practical algorithm for inferring type instantiation graphs and provide empirical evidence to the scalability of the presented techniques by applying them in the context of points-to analysis for C programs.

References

  1. ASU88 A.V. Aho, R. Sethi, and J. D. Ullman. Compilers Principles, Techniques, and Tools. Addison Wesley, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. CGS+99 Jong-Deok Choi, Manish Gupta, Mauricio Serrano, Vugranam C. Sreedhar, and Sam Midkiff. Escape analysis for java. In OOPSLA'99 {OOP99}, pages 1-19. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. CRL99 Ramkrishna Chatterjee, Barbara G. Ryder, and William A. Landi. Relevant context inference. In Conference Record of the 26th Annual A CM SIGPLAN-SIGA CT Symposium on Principles of Programming Languages, January 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. DM82 L. Damas and R. Milner. Principle type-schemes for functional programs. In Conference Record of the 9th Annual ACM Symposium on Principles of Programming Languages, pages 207-212, January 1982. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. FFA00 Jeffrey S. Foster, Manuel Fahndrich, and Alexander Aiken. Polymorphic versus monomorphic points-to analysis. In Proceedings of the 7th International Static Analysis Symposium, Lecture Notes in Computer Science. Springer Verlag, June 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. FRD00 Manuel Fahndrich, Jakob Rehof, and Manuvir Das. From polymorphic subtyping to CFL reachability: Context-sensitive flow analysis using instantiation constraints. Technical Report MSR- TR-99-84, Microsoft Research, March 2000.Google ScholarGoogle Scholar
  7. Hen93 Fritz Henglein. Type inference with polymorphic recursion. ACM Transactions on Programming Languages and Systems, 15(2):253-289, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. HM97 Nevin Heintze and David McAllester. Lineartime subtransitive control flow analysis. In Proceedings of the 1997 A CM SIGPLAN Conference on Programming Language Design and Implementation, number 32:6 in SIGPLAN notices, pages 261-272, June 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. JW95 Suresh Jagannathan and Andrew Wright. Effective flow analysis for avoiding run-time checks. In Proceedings of the 2nd International Static Analysis Symposium, volume 983 of Lecture Notes in Computer Science, pages 207-224. Springer Verlag, September 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. KTU93 A.J. Kfoury, J. Tiuryn, and P. Urzyczyn. The undecidability of the semi-unification problem. Information and Computation, 102(1):83-101, January 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. KTU94 A.J. Kfoury, J. Tiuryn, and P. Urzyczyn. An analysis of ML typability. Journal of the A CM, 41(2):368-398, March 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. LH99 Donglin Liang and Mary Jean Harrold. Efficient points-to analysis for whole-program analysis. In Proceedings of the 7th European Software Engineering Conference and the 7th A CM SIGSOFT Symposium on the Foundations of Software Engineering, September 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Mil78 R. Milner. A theory of type polymorphism in programming. Journal of Computer and System Sciences, 17:348-375, 1978.Google ScholarGoogle ScholarCross RefCross Ref
  14. MR97 David Melski and Thomas Reps. Interconvertibility of set constraints and context-free language reachability. In Proceedings of the A CM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation (PEPM-97), volume 32, 12 of ACM SIGPLAN Notices, pages 74-89. ACM Press, June 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Myc84 A. Mycroft. Polymorphic type schemes and recursive definitions. In Proceedings of the 6th International Symposium on Programming, pages 217-228, 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. NN97 Flemming Nielson and Hanne Riis Nielson. Infinitary control flow analysis: a collecting semantics for closure analysis. In Conference Record of the 24th Annual A CM SIGPLAN-SIGA CT Symposium on Principles of Programming Languages, pages 332-345. ACM Press, January 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. OJ97 Robert O'Callahan and Daniel Jackson. Lackwit: A program understanding tool based on type inference. In International Conference on Software Engineering, May 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. OOP99 Proceedings of 14th Annual Conference on Object-Oriented Programming, Systems, Languages, and Applications, volume 34, 10 of A CM SIGPLAN Notices. ACM Press, November 1999.Google ScholarGoogle Scholar
  19. RHS95 Thomas Reps, Susan Horwitz, and Mooly Sagiv. Precise interprocedural datafiow analysis via graph reachability. In Conference record of POPL '95, 22nd A CM SIGPLAN-SIGA CT Symposium on Principles of Programming Languages: papers presented at the Symposium: San Francisco, California, January 22-25, 1995, pages 49-61, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Ste96 Bjarne Steensgaard. Points-to analysis in almost linear time. In Conference Record of the 23rd Annual A CM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 32- 41, January 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. WL95 Robert P. Wilson and Monica S. Lain. Efficient context-sensitive pointer analysis for c programs. In Proceedings of the 1995 A CM SIGPLAN Conference on Programming Language Design and Implementation, number 30:6 in SIGPLAN notices, June 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. WR99 John Whaley and Martin Rinard. Compositional pointer and escape analysis for java programs. In OOPSLA'99 {OOP99}, pages 187-206. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Scalable context-sensitive flow analysis using instantiation constraints

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in

        Full Access

        • Published in

          cover image ACM SIGPLAN Notices
          ACM SIGPLAN Notices  Volume 35, Issue 5
          May 2000
          357 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/358438
          Issue’s Table of Contents
          • cover image ACM Conferences
            PLDI '00: Proceedings of the ACM SIGPLAN 2000 conference on Programming language design and implementation
            August 2000
            358 pages
            ISBN:1581131992
            DOI:10.1145/349299

          Copyright © 2000 ACM

          Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 1 May 2000

          Check for updates

          Qualifiers

          • article

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader