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.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Andersen, L.O.: Program Analysis and Specialization for the C Programming Language. PhD thesis, DIKU, University of Copenhagen (DIKU report 94/19) (May 1994)
Augustsson, L.: Implementing haskell overloading. In: Functional Programming Languages and Computer Architecture, pp. 65–73 (1993)
Das, M.: Unification-based pointer analysis with directional assignments. In: PLDI 2000, pp. 35–46. ACM Press, New York (2000)
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)
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)
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)
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)
Fähndrich, M., Rehof, J., Das, M.: Scalable Context-Sensitive Flow Analysis using Instantiation Constraints. In: PLDI 2000, Vancouver B.C., Canada (June 2000)
Gedell, T.: A Case Study on the Scalability of a Constraint Solving Algorithm: Polymorphic Usage Analysis with Subtyping. Master thesis (October 2003)
Gedell, T.: Static analysis and deductive verification of programs. Licentiate thesis (2006)
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)
Gustavsson, J., Svenningsson, J.: Constraint abstractions. In: Danvy, O., Filinski, A. (eds.) PADO 2001. LNCS, vol. 2053, pp. 63–83. Springer, Heidelberg (2001)
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)
Henglein, F.: Type inference with polymorphic recursion. ACM Transactions on Programming Languages and Systems 15(2), 253–289 (1993)
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)
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)
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)
Marlow, S.: Update Avoidance Analysis by Abstract Interpretation. In: Proc. 1993 Glasgow Workshop on Functional Programming, Workshops in Computing. Springer, Heidelberg (1993)
Mycroft, A.: Abstract Interpretation and Optimizing Transformations for Applicative Programs. PhD thesis, University of Edinburg (1982)
Mycroft, A.: Polymorphic Type Schemes and Recursive Definitions. In: Proceedings 6th International Symposium on Programming, Toulouse, July 1984. LNCS. Springer, Heidelberg (1984)
Partain, W.: The nofib benchmark suite of haskell programs (1993)
Jones, S.P., Marlow, S.: Secrets of the Glasgow Haskell compiler inliner. In: Workshop on Implementing Declarative Languages (1999)
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)
Steensgaard, B.: Points-to analysis in almost linear time. In: POPL 1996, pp. 32–41. ACM Press, New York (1996)
Turner, D.N., Wadler, P., Mossin, C.: Once upon a type. In: Proc. of FPCA, La Jolla. ACM Press, New York (1995)
Wansbrough, K.: Simple Polymorphic Usage Analysis. PhD thesis, Computer Laboratory. Cambridge University, England (March 2002)
Wansbrough, K., Jones, S.P.: Once Upon a Polymorphic Type. In: Proc. of POPL 1999. ACM Press, New York (1999)
Wansbrough, K., Jones, S.P.: Simple Usage Polymorphism. In: ACM SIGPLAN Workshop on Types in Compilation. Springer, Heidelberg (2000)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)