skip to main content
10.1145/379605.379635acmconferencesArticle/Chapter ViewAbstractPublication PagespasteConference Proceedingsconference-collections
Article

Type-based analysis and applications

Published:01 June 2001Publication History

ABSTRACT

Type-based analysis is an approach to static analysis of programs that has been studied for more than a decade. A type-based analysis assumes that the program type checks, and the analysis takes advantage of that. This paper examines the state of the art of type-based analysis, and it surveys some of the many software tools that use type-based analysis. Most of the surveyed tools use types as discriminators, while most of the theoretical studies use type and effect systems. We conclude that type-based analysis is a promising approach to achieving both provable correctness and good performance with a reasonable effort.

References

  1. 1.Martin Abadi, Anindya Banerjee, Nevin Heintze, and Jon Riecke. A core calculus of dependency. In Proceedings of POPL'99, 26th Annual SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 147-160, 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. 2.Alfred V. Aho, Ravi I. Sethi, and Jeffrey D. Ullman. Compilers: Principles, Techniques, and Tools. Addison-Wesley, Reading, MA, second edition, 1986.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 3.Torben Amtoft. Minimal thunkification. In Proceedings of WSA'93, 3rd International Workshop on Static Analysis, pages 218-229. Springer-Verlag (LNCS 724), 1993.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. 4.Andrew W. Appel. Modern Compiler Implementation in Java. Cambridge University Press, 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. 5.David F. Bacon and Peter F. Sweeney. Fast static analysis of C++ virtual function calls. In Proceedings of the Eleventh Annual Conference onObject-Oriented Programming Systems, Languages, and Applications (OOPSLA'96), pages 324-341, San Jose, CA, 1996. SIGPLAN Notices 31(10).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 6.David Francis Bacon. Fast and Effective Optimization of Statically Typed Object-Oriented Languages. PhD thesis, Computer Science Division, University of California, Berkeley, December 1997. Report No. UCB/CSD-98-1017.]]Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. 7.Anindya Banerjee. A modular, polyvariant and typebased closure analysis. In Proceedings of ICFP'97, ACM International Conference onFunctional Programming, pages 1-10, 1997.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. 8.Lars Birkedal, Mads Tofte, and Magnus Vejlstrup. From region inference to von Neumann machines via region representation inference. In Proceedings of POPL'96, 23nd Annual SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 171-183, 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. 9.Boris Bokowski and Jan Vitek. Confined types. In Proceedings of the Fourteenth Annual Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA'99), pages 82-96, Denver, CO, 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. 10.Luca Cardelli. Type systems. In CRC Handbook of Computer Science and Engineering, chapter 103, pages 2208-2236. CRC Press, 1997.]]Google ScholarGoogle Scholar
  11. 11.Luca Cardelli, Jim Donahue, Mick Jordan, Bill Kalsow, and Greg Nelson. The Modula-3 type system. In Sixteenth Symposium on Principles of Programming Languages, pages 202-212, 1989.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. 12.James C. Corbett, Matthew B. Dwyer, John Hatcliff, Shawn Laubach, Corina S. Pasareanu, Robby, and Hongjun Zheng. Bandera : Extracting finite-state models from Java source code. In Proceedings of ICSE'00, 22nd International Conference on Software Engineering, pages 439-448, 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. 13.J. Dean, D. Grove, and C. Chambers. Optimization of object-oriented programs using static class hierarchy analysis. In W. Olthoff, editor, Proceedings of the Ninth European Conference on Object-Oriented Programming (ECOOP'95), pages 77-101, Aarhus, Denmark, August 1995. Springer-Verlag.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. 14.David Detlefs, K. Rustan Leino, Greg Nelson, and James Saxe. Extended static checking. Technical Report 159, Compaq Systems Research Center, 1998.]]Google ScholarGoogle Scholar
  15. 15.Allyn Dimock, Robert Muller, Franklyn Turbak, and J. B. Wells. Strongly typed ow-directed representation transformations. In Proceedings ICFP '97, International Conference onFunctional Programming, ACM SIGPLAN Notices 32(8), pages 11-24, 1997.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. 16.Amer Diwan, Kathryn McKinley, and Eliot Moss. Type-based alias analysis. In Proceedings of PLDI'98, ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 106-117, 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. 17.Margaret A. Ellis and Bjarne Stroustrup. The Annotated C++Reference Manual. Addison-Wesley, 1990.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. 18.Stephen Fink, Kathleen Knobe, and Vivek Sarkar. Unified analysis of array and object references in strongly typed languages. In Proceedings of SAS'00, 7th International Static Analysis Symposium, pages 155-174. Springer-Verlag (LNCS 1824), 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. 19.Adam Fischbach and John Hannan. Type systems and algorithms for useless-variable elimination. In Proceedings of PADO'01, Symposium on Programs as Data Objects, 2001. To appear.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. 20.Cormac Flanagan and Stephen Freund. Type-based race detection for Java. In Proceedings of PLDI'00, ACM SIGPLAN Conference onProgramming Language Design and Implementation, pages 219-232, 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. 21.Sanjay Ghemawat, Keith Randall, and Daniel Scales. Field analysis: Getting useful and low-cost interprocedural information. In Proceedings of PLDI'00, ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 334-344, 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. 22.Rajeev Gopal and Stephan R. Schach. Using automatic program decomposition techniques in software maintenance tools. In Proceedings of ICSM'89, International Conference on Software Maintenance, pages 132-141, 1989.]]Google ScholarGoogle ScholarCross RefCross Ref
  23. 23.James Gosling, Bill Joy, and Guy Steele. The Java Language Specification. Addison-Wesley, 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. 24.Christian Grothoff, Jens Palsberg, and Jan Vitek. Encapsulating objects with confined types. In Proceedings of OOPSLA'01, ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages and Applications, October 2001. To appear.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. 25.John Hannan. Type systems for closure conversions. In Proceedings of Workshop on Types for Program Analysis, pages 48-62, 1995.]]Google ScholarGoogle Scholar
  26. 26.Nevin Heintze. Control-flow analysis and type systems. In Proceedings of SAS'95, International Static Analysis Symposium, pages 189-206. Springer-Verlag (LNCS 983), Glasgow, Scotland, September 1995.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. 27.Nevin Heintze and David McAllester. Linear-time subtransitive control ow analysis. In Proceedings of ACM SIGPLAN 1997 Conference onProgramming Language Design and Implementation, pages 261-272, 1997.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. 28.Susan Horwitz, Thomas Reps, and David Binkley. Interprocedural slicing using dependence graphs. ACM Transactions on Programming Languages and Systems, 12(1):26-60, 1990.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. 29.Antony L. Hosking, Nathaniel Nystrom, David Whitlock, Quintin Cutts, and Amer Diwan. Partial redundancy elimination for access path expressions. Software - Practice & Experience, 31(6):577-600, 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. 30.Suresh Jagannathan, Andrew Wright, and Stephen Weeks. Type-directed ow analysis for typed intermediate languages. In Proceedings of SAS'97, International Static Analysis Symposium. Springer-Verlag, 1997.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. 31.Thomas Jensen. Inference of polymorphic and conditional strictness properties. In Proceedings of POPL'98, 25th Annual SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 209-221, San Diego, California, January 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. 32.Pierre Jouvelot and David Gifford. Algebraic reconstruction of types and effects. In Proceedings of POPL'91, SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 303-310, 1991.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. 33.Brian W. Kernighan and Dennis M. Ritchie. The C Programming Language. Prentice-Hall, 1978.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. 34.Naoki Kobayashi. Type-based useless variable elimination. In Proceedings of PEPM'00, ACM Symposium on Partial Evaluation and Semantics-Based Program Manipulation, pages 84-93, 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. 35.Tsung-Min Kuo and Prateek Mishra. On strictness and its analysis. In Proceedings of POPL'87, SIGPLAN- SIGACT Symposium on Principles of Programming Languages, pages 144-155, 1987.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. 36.Tsung-Min Kuo and Prateek Mishra. Strictness analysis: A new perspective based on type inference. In Proceedings of Conference onFunctional Programming Languages and Computer Architecture, pages 260-272, 1989.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. 37.John Lucassen and David Gifford. Polymorphic effect systems. In Proceedings of POPL'88, SIGPLAN- SIGACT Symposium on Principles of Programming Languages, pages 47-57, 1988.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. 38.Robin Milner. A theory of type polymorphism in programming. Journal of Computer and System Sciences, 17:348-375, 1978.]]Google ScholarGoogle ScholarCross RefCross Ref
  39. 39.Robin Milner, Mads Tofte, and Robert Harper. The Definition of Standard ML. MIT Press, 1990.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. 40.Greg Morrisett, Karl Crary, Neal Glew, Dan Grossman, Richard Samuels, Frederick Smith, David Walker, Stephanie Weirich, and Steve Zdancewic. Talx86: A realistic typed assembly language. ACM Workshop on Compiler Support for System Software, May 1999.]]Google ScholarGoogle Scholar
  41. 41.Greg Morrisett, David Walker, Karl Crary, and Neal Glew. From system F to typed assembly language. In Proceedings of POPL'98, 25th Annual SIGPLAN- SIGACT Symposium on Principles of Programming Languages, pages 85-97, 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. 42.Christian Mossin. Exact ow analysis. In Proceedings of SAS'97, International Static Analysis Symposium, pages 250-264. Springer-Verlag (LNCS), 1997.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. 43.Christian Mossin. Flow Analysis of Typed Higher-Order Languages. PhD thesis, DIKU, University of Copenhagen, 1997.]]Google ScholarGoogle Scholar
  44. 44.Steven Muchnick. Advanced Compiler Design and Implementation. Morgan Kaufmann, 1997.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. 45.Greg Nelson. Systems Programming with Modula-3. Prentice Hall, 1991.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. 46.Flemming Nielson. The typed lambda-calculus with first-class processes. In Proceedings of PARLE, pages 357-373, April 1989.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. 47.Flemming Nielson and Hanne Riis Nielson. Type and effect systems. In Correct System Design, pages 114- 136, 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. 48.Flemming Nielson, Hanne Riis Nielson, and Chris Hankin. Principles of Program Analysis. Springer-Verlag, 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. 49.Hanne R. Nielson and Flemming Nielson. Automatic binding time analysis for a typed calculus. Science of Computer Programming, 10:139-176, 1988.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. 50.Tobias Nipkow andDavid von Oheimb. Javalight is typesafe - definitely. InProceedings of POPL'98, 25th Annual SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 161-170, San Diego, California, January 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  51. 51.Peter Trbik and Jens Palsberg. Trust in the calculus. Journal of Functional Programming, 7(6):557- 591, November 1997. Preliminary version in Proceedings of SAS'95, International Static Analysis Symposium, Springer-Verlag (LNCS 983), pages 314-330, Glasgow, Scotland, September 1995.]]Google ScholarGoogle Scholar
  52. 52.Jens Palsberg. Closure analysis in constraint form. ACM Transactions on Programming Languages and Systems, 17(1):47-62, January 1995. Preliminary version in Proceedings of CAAP'94, Colloquium on Trees in Algebra and Programming, Springer-Verlag (LNCS 787), pages 276-290, Edinburgh, Scotland, April 1994.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  53. 53.Jens Palsberg and Christina Pavlopoulou. From polyvariant ow information to intersection and union types. Journal of Functional Programming, toappear. Preliminary version in Proceedings of POPL'98, 25th Annual SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 197-208, San Diego, California, January 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  54. 54.Jens Palsberg and Michael I. Schwartzbach. Objectoriented type inference. In Proceedings of OOPSLA'91, ACM SIGPLAN Sixth Annual Conference on Object- Oriented Programming Systems, Languages and Applications, pages 146-161, Phoenix, Arizona, October 1991.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  55. 55.Jens Palsberg and Michael I. Schwartzbach. Object- Oriented Type Systems. John Wiley & Sons, 1994.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  56. 56.Jakob Rehof and Manuel F.ahndrich. Type-based ow analysis: From polymorphic subtyping to c - reachability. InProceedings of POPL'01, 28th Annual SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 54-66, 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  57. 57.Debra J. Richardson. TAOS: Testing with analysis and oracle support. In International Symposium on Software Testing and Analysis, pages 138-153, 1994.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  58. 58.Zhong Shao and Valery Trifonov. Type-directed continuation allocation. In ACM Workshop on Types in Compilation, pages 116-136, Kyoto, Japan, March 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  59. 59.Olin Shivers. Control-Flow Analysis of Higher-Order Languages. PhD thesis, CMU, May 1991. CMU-CS- 91-145.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  60. 60.Geoffrey Smith and Dennis Volpano. Secure information ow in multi-threaded imperative language. In Proceedings of POPL'98, 25th Annual SIGPLAN- SIGACT Symposium on Principles of Programming Languages, pages 355-364, 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  61. 61.Kirsten Solberg. Annotated Type Systems for Program Analysis. PhD thesis, University ofAarhus, 1995.]]Google ScholarGoogle Scholar
  62. 62.Kirsten Solberg, Hanne Riis Nielson, and Flemming Nielson. Strictness and totality analysis. In Proceedings of SAS'94, International Static Analysis Symposium, pages 408-422. Springer-Verlag (LNCS 864), 1994.]]Google ScholarGoogle ScholarCross RefCross Ref
  63. 63.Kirsten Solberg, Hanne Riis Nielson, and Flemming Nielson. Strictness and totality analysis with conjunction. In Proceedings of TAPSOFT'95, Theory and Practice of Software Development, pages 501-515. Springer- Verlag (LNCS 915), Aarhus, Denmark, May 1995.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  64. 64.Vijay Sundaresan, Laurie Hendren, Chrislain Razamahefa, Raja Vallee-Rai, Patrick Lam,Etienne Gagnon, and Charles Godin. Practical virtual method call resolution for Java. In Proceedings of the Fifteenth Annual Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA'00), pages 264-280, Minneapolis, Minnesota), 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  65. 65.Peter F. Sweeney and Frank Tip. Extracting librarybased object-oriented applications. In Proceedings of the Eighth International Symposium on the Foundations of Software Engineering (FSE-8), pages 98-107, November 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  66. 66.Jean-Pierre Talpin and Pierre Jouvelot. The type and effect discipline. Information and Computation, 111:245-296, 1994. A preliminary version was presented at LICS'92.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  67. 67.Yan Mei Tang and Pierre Jouvelot. Separate abstract interpretation for control- ow analysis. In Proceedings of TACS'94, Theoretical Aspects of Computing Software, pages 224-243. Springer-Verlag (LNCS 789), 1994.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  68. 68.Yan Mei Tang and Pierre Jouvelot. Effect systems with subtyping. In Proceedings of PEPM'95, ACM Symposium on Partial Evaluation and Sematics-Based Program Manipulation, pages 45-53. ACM Press, 1995.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  69. 69.Peter Thiemann. Formalizing resource allocation in a compiler. In ACM Workshop on Types in Compilation, pages 178-194, Kyoto, Japan, March 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  70. 70.Frank Tip, Chris Laffra, Peter F. Sweeney, and David Streeter. Practical experience with an application extractor for Java. In Proceedings of the Fourteenth Annual Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA'99), pages 292-305, Denver, CO), 1999. SIGPLAN Notices 34(10).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  71. 71.Frank Tip and Jens Palsberg. Scalable propagationbased call graph construction algorithms. In Proceedings of OOPSLA'00, ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages and Applications, pages 281-293, Minneapolis, Minnesota, October 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  72. 72.Mads Tofte and Jean-Pierre Talpin. Region-based memory management. Information and Computation, 132(2):109-176, 1997.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  73. 73.Franklyn Turbak, Allyn Dimock, Robert Muller, and J. B. Wells. Compiling with polymorphic and polyvariant ow types. In ACM SIGPLAN Workshop on Types in Compilation, June 1997. http://www.cs.bc.edu/~muller/postscript/tic97.ps.Z.]]Google ScholarGoogle Scholar
  74. 74.Mark Weiser. Program slicing. IEEE Transactions on Software Engineering, 10(4):352-357, July 1984.]]Google ScholarGoogle ScholarDigital LibraryDigital Library
  75. 75.J. B. Wells, Allyn Dimock, Robert Muller, and Franklyn Turbak. A calculus with polymorphic and polyvariant ow types. Journal of Functional Programming. To appear.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  76. 76.Andrew Wright. Typing references by effect inference. In Proceedings of ESOP'92, European Symposium on Programming, pages 473-491. Springer-Verlag (LNCS 582), 1992.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  77. 77.Andrew Wright and Matthias Felleisen. A syntactic approach to type soundness. Information and Computation, 115(1):38-94, 1994.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  78. 78.David A. Wright. A new technique for strictness analysis. In Proceedings of TAPSOFT'91, pages 235-258. Springer-Verlag (LNCS 494), 1991.]] Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Type-based analysis and applications

        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
        • Published in

          cover image ACM Conferences
          PASTE '01: Proceedings of the 2001 ACM SIGPLAN-SIGSOFT workshop on Program analysis for software tools and engineering
          June 2001
          103 pages
          ISBN:1581134134
          DOI:10.1145/379605

          Copyright © 2001 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 June 2001

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • Article

          Acceptance Rates

          PASTE '01 Paper Acceptance Rate13of24submissions,54%Overall Acceptance Rate57of159submissions,36%

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader