Skip to main content

Polymorphism, Subtyping, Whole Program Analysis and Accurate Data Types in Usage Analysis

  • Conference paper
Programming Languages and Systems (APLAS 2006)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 4279))

Included in the following conference series:

Abstract

There are a number of choices to be made in the design of a type based usage analysis. Some of these are: Should the analysis be monomorphic or have some degree of polymorphism? What about subtyping? How should the analysis deal with user defined algebraic data types? Should it be a whole program analysis?

Several researchers have speculated that these features are important but there has been a lack of empirical evidence. In this paper we present a systematic evaluation of each of these features in the context of a full scale implementation of a usage analysis for Haskell.

Our measurements show that all features increase the precision. It is, however, not necessary to have them all to obtain an acceptable precision.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Andersen, L.O.: Program Analysis and Specialization for the C Programming Language. PhD thesis, DIKU, University of Copenhagen (DIKU report 94/19) (May 1994)

    Google Scholar 

  2. Augustsson, L.: Implementing haskell overloading. In: Functional Programming Languages and Computer Architecture, pp. 65–73 (1993)

    Google Scholar 

  3. Das, M.: Unification-based pointer analysis with directional assignments. In: PLDI 2000, pp. 35–46. ACM Press, New York (2000)

    Chapter  Google Scholar 

  4. Dussart, D., Henglein, F., Mossin, C.: Polymorphic recursion and subtype qualifications: Polymorphic binding-time analysis in polynomial time. In: Mycroft, A. (ed.) SAS 1995. LNCS, vol. 983. Springer, Heidelberg (1995)

    Google Scholar 

  5. Das, M., Liblit, B., Fähndrich, M., Rehof, J.: Estimating the impact of scalable pointer analysis on optimization. In: Cousot, P. (ed.) SAS 2001. LNCS, vol. 2126, p. 260. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  6. Faxén, K.-F.: Optimizing lazy functional programs using flow inference. In: Mycroft, A. (ed.) SAS 1995. LNCS, vol. 983, pp. 136–153. Springer, Heidelberg (1995)

    Google Scholar 

  7. Foster, J.S., Fähndrich, M., Aiken, A.: Polymorphic versus monomorphic flow-insensitive points-to analysis for C. In: Palsberg, J. (ed.) SAS 2000. LNCS, vol. 1824, pp. 175–199. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  8. Fähndrich, M., Rehof, J., Das, M.: Scalable Context-Sensitive Flow Analysis using Instantiation Constraints. In: PLDI 2000, Vancouver B.C., Canada (June 2000)

    Google Scholar 

  9. Gedell, T.: A Case Study on the Scalability of a Constraint Solving Algorithm: Polymorphic Usage Analysis with Subtyping. Master thesis (October 2003)

    Google Scholar 

  10. Gedell, T.: Static analysis and deductive verification of programs. Licentiate thesis (2006)

    Google Scholar 

  11. Gustavsson, J., Svenningsson, J.: A usage analysis with bounded usage polymorphism and subtyping. In: Mohnen, M., Koopman, P. (eds.) IFL 2000. LNCS, vol. 2011, pp. 140–157. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  12. Gustavsson, J., Svenningsson, J.: Constraint abstractions. In: Danvy, O., Filinski, A. (eds.) PADO 2001. LNCS, vol. 2053, pp. 63–83. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  13. Gustavsson, J.: A type based sharing analysis for update avoidance and optimisation. In: ICFP, ACM SIGPLAN Notices 34(1), pp. 39–50. ACM, New york (1998)

    Google Scholar 

  14. Henglein, F.: Type inference with polymorphic recursion. ACM Transactions on Programming Languages and Systems 15(2), 253–289 (1993)

    Article  Google Scholar 

  15. Heintze, N., Tardieu, O.: Ultra-fast aliasing analysis using CLA: A million lines of C code in a second. In: PLDI 2001, pp. 254–263. ACM Press, New York (2001)

    Chapter  Google Scholar 

  16. Jones, M.P.: Dictionary-free overloading by partial evaluation. In: Partial Evaluation and Semantics-Based Program Manipulation, Orlando, Florida (Technical Report 94/9, Department of Computer Science, University of Melbourne), pp. 107–117 (June 1994)

    Google Scholar 

  17. Launchbury, J., Gill, A., Hughes, J., Marlow, S., Peyton Jones, S.L., Wadler, P.: Avoiding Unnecessary Updates. In: Launchbury, J., Sansom, P.M. (eds.) Functional Programming, Workshops in Computing, Glasgow. Springer, Heidelberg (1992)

    Google Scholar 

  18. Marlow, S.: Update Avoidance Analysis by Abstract Interpretation. In: Proc. 1993 Glasgow Workshop on Functional Programming, Workshops in Computing. Springer, Heidelberg (1993)

    Google Scholar 

  19. Mycroft, A.: Abstract Interpretation and Optimizing Transformations for Applicative Programs. PhD thesis, University of Edinburg (1982)

    Google Scholar 

  20. Mycroft, A.: Polymorphic Type Schemes and Recursive Definitions. In: Proceedings 6th International Symposium on Programming, Toulouse, July 1984. LNCS. Springer, Heidelberg (1984)

    Google Scholar 

  21. Partain, W.: The nofib benchmark suite of haskell programs (1993)

    Google Scholar 

  22. Jones, S.P., Marlow, S.: Secrets of the Glasgow Haskell compiler inliner. In: Workshop on Implementing Declarative Languages (1999)

    Google Scholar 

  23. Peyton Jones, S., Partain, W., Santos, A.: Let-floating: moving bindings to give faster programs. In: Proc. of ICFP 1996, ACM SIGPLAN Notices, vol. 31(6), pp. 1–12. ACM, New York (1996)

    Google Scholar 

  24. Steensgaard, B.: Points-to analysis in almost linear time. In: POPL 1996, pp. 32–41. ACM Press, New York (1996)

    Chapter  Google Scholar 

  25. Turner, D.N., Wadler, P., Mossin, C.: Once upon a type. In: Proc. of FPCA, La Jolla. ACM Press, New York (1995)

    Google Scholar 

  26. Wansbrough, K.: Simple Polymorphic Usage Analysis. PhD thesis, Computer Laboratory. Cambridge University, England (March 2002)

    Google Scholar 

  27. Wansbrough, K., Jones, S.P.: Once Upon a Polymorphic Type. In: Proc. of POPL 1999. ACM Press, New York (1999)

    Google Scholar 

  28. Wansbrough, K., Jones, S.P.: Simple Usage Polymorphism. In: ACM SIGPLAN Workshop on Types in Compilation. Springer, Heidelberg (2000)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2006 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Gedell, T., Gustavsson, J., Svenningsson, J. (2006). Polymorphism, Subtyping, Whole Program Analysis and Accurate Data Types in Usage Analysis. In: Kobayashi, N. (eds) Programming Languages and Systems. APLAS 2006. Lecture Notes in Computer Science, vol 4279. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11924661_13

Download citation

  • DOI: https://doi.org/10.1007/11924661_13

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-48937-5

  • Online ISBN: 978-3-540-48938-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics