Abstract
We carry out an experimental analysis for two of the design dimensions of flow-insensitive points-to analysis for C: polymorphic versus monomorphic and equality-based versus inclusion-based. Holding other analysis parameters fixed, we measure the precision of the four design points on a suite of benchmarks of up to 90,000 abstract syntax tree nodes. Our experiments show that the benefit of polymorphism varies significantly with the underlying monomorphic analysis. For our equality-based analysis, adding polymorphism greatly increases precision, while for our inclusion-based analysis, adding polymorphism hardly makes any difference. We also gain some insight into the nature of polymorphism in points-to analysis of C. In particular, we find considerable polymorphism available in function parameters, but little or no polymorphism in function results, and we show how this observation explains our results.
This research was supported in part by the National Science Foundation Young Investigator Award No. CCR-9457812, NASA Contract No. NAG2-1210, an NDSEG fellowship, and an equipment donation from Intel.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Aiken, A., Fähndrich, M., Foster, J.S., Su, Z.: A Toolkit for Constructing Type- and Constraint-Based Program Analyses. In: Leroy, X., Ohori, A. (eds.) TIC 1998. LNCS, vol. 1473, pp. 78–96. Springer, Heidelberg (1998)
Aiken, A., Wimmers, E.L.: Solving Systems of Set Constraints. In: Proceedings, Seventh Annual IEEE Symposium on Logic in Computer Science, Santa Cruz, California, pp. 329–340 (June 1992)
Aiken, A., Wimmers, E.L.: Type Inclusion Constraints and Type Inference. In: FPCA 1993 Conference on Functional Programming Languages and Computer Architecture, Copenhagen, Denmark, pp. 31–41 (June 1993)
Andersen, L.O.: Program Analysis and Specialization for the C Programming Language. PhD thesis, DIKU, Department of Computer Science, University of Copenhagen (May 1994)
Burke, M., Carini, P., Choi, J.-D., Hind, M.: Flow-Insensitive Interprocedural Alias Analysis in the Presence of Pointers. In: Pingali, K.K., Gelernter, D., Padua, D.A., Banerjee, U., Nicolau, A. (eds.) LCPC 1994. LNCS, vol. 892, pp. 234–250. Springer, Heidelberg (1995)
Chatterjee, R., Ryder, B.G., Landi, W.A.: Relevant Context Inference. In: Proceedings of the 26th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, San Antonio, Texas, pp. 133–146 (January 1999)
Das, M.: Unification-based Pointer Analysis with Directional Assignments. In: Proceedings of the 2000 ACM SIGPLAN Conference on Programming Language Design and Implementation, Vancouver B.C., Canada (June 2000) (to appear)
Debray, S., Muth, R., Weippert, M.: Alias Analysis of Executable Code. In: Proceedings of the 25th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, San Diego, California, pp. 12–24 (January 1998)
Deutsch, A.: Interprocedural May-Alias Analysis for Pointers: Beyond k-limiting. In: Proceedings of the 1994 ACM SIGPLAN Conference on Programming Language Design and Implementation, Orlando, Florida, pp. 230–241 (June 1994)
Dor, N., Rodeh, M., Sagiv, M.: Detecting Memory Errors via Static Pointer Analysis. In: Proceedings of the ACM SIGPLAN/SIGSOFT Workshop on Program Analysis for Software Tools and Engineering, Montreal, Canada, June 1998, pp. 27–34 (1998)
Emami, M., Ghiya, R., Hendren, L.J.: Context-Sensitive Interprocedural Pointsto Analysis in the Presence of Function Pointers. In: Proceedings of the 1994 ACM SIGPLAN Conference on Programming Language Design and Implementation, Orlando, Florida, pp. 242–256 (June 1994)
Fähndrich, M.: BANE: A Library for Scalable Constraint-Based Program Analysis. PhD thesis, University of California, Berkeley (1999)
Fähndrich, M., Aiken, A.: Program Analysis using Mixed Term and Set Constraints. In: Van Hentenryck, P. (ed.) SAS 1997. LNCS, vol. 1302, pp. 114–126. Springer, Heidelberg (1997)
Fähndrich, M., Foster, J.S., Su, Z., Aiken, A.: Partial Online Cycle Elimination in Inclusion Constraint Graphs. In: Proceedings of the 1998 ACM SIGPLAN Conference on Programming Language Design and Implementation, Montreal, Canada, pp. 85–96 (June 1998)
Fähndrich, M., Rehof, J., Das, M.: Scalable Context-Sensitive Flow Analysis using Instantiation Constraints. In: Proceedings of the 2000 ACM SIGPLAN Conference on Programming Language Design and Implementation, Vancouver B.C., Canada (June 2000) (to appear)
Foster, J.S., Fähndrich, M., Aiken, A.: Flow-Insensitive Points-to Analysis with Term and Set Constraints. Technical Report UCB//CSD-97-964, University of California, Berkeley (August 1997)
Foster, J.S., Fähndrich, M., Aiken, A.: Polymorphic versus Monomorphic Flowinsensitive Points-to Analysis for C. Technical report, University of California, Berkeley (April 2000)
Heintze, N., Jaffar, J.: A Decision Procedure for a Class of Set Constraints. In: Proceedings, Fifth Annual IEEE Symposium on Logic in Computer Science, Philadelphia, Pennsylvania, pp. 42–51 (June 1990)
Hind, M., Pioli, A.: Assessing the Effects of Flow-Sensitivity on Pointer Alias Analyses. In: Levi, G. (ed.) SAS 1998. LNCS, vol. 1503, pp. 57–81. Springer, Heidelberg (1998)
Landi, W., Ryder, B.G.: A Safe Approximate Algorithm for Interprocedural Pointer Aliasing. In: Proceedings of the 1992 ACM SIGPLAN Conference on Programming Language Design and Implementation, San Francisco, California, June 1992, pp. 235–248 (1992)
Milner, R.: A Theory of Type Polymorphism in Programming. Journal of Computer and System Sciences 17, 348–375 (1978)
Mossin, C.: Flow Analysis of Typed Higher-Order Programs. PhD thesis, DIKU, Department of Computer Science, University of Copenhagen (1996)
O’Callahan, R., Jackson, D.: Lackwit: A Program Understanding Tool Based on Type Inference. In: Proceedings of the 19th International Conference on Software Engineering, Boston, Massachusetts, May 1997, pp. 338–348 (1997)
Odersky, M., Sulzmann, M., Wehr, M.: Type Inference with Constrained Types. In: Pierce, B. (ed.) Proceedings of the 4th International Workshop on Foundations of Object-Oriented Languages (January 1997)
Rémy, D.: Typechecking records and variants in a natural extension of ML. In: Proceedings of the 16th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Austin, Texas, January 1989, pp. 77–88 (1989)
Ruf, E.: Context-Insensitive Alias Analysis Reconsidered. In: Proceedings of the 1995 ACM SIGPLAN Conference on Programming Language Design and Implementation, La Jolla, California, June 1995, pp. 13–22 (1995)
Sagiv, M., Reps, T., Wilhelm, R.: Parametric Shape Analysis via 3-Valued Logic. In: Proceedings of the 26th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, San Antonio, Texas, January 1999, pp. 105–118 (1999)
Shapiro, M., Horwitz, S.: Fast and Accurate Flow-Insensitive Points-To Analysis. In: Proceedings of the 24th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Paris, France, January 1997, pp. 1–14 (1997)
Steensgaard, B.: Points-to Analysis in Almost Linear Time. In: Proceedings of the 23rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, St. Petersburg Beach, Florida, January 1996, pp. 32–41 (1996)
Su, Z., Fähndrich, M., Aiken, A.: Projection Merging: Reducing Redundancies in Inclusion Constraint Graphs. In: Proceedings of the 27th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Boston, Massachusetts (January 2000) (to appear)
Wilson, R.P., Lam, M.S.: Efficient Context-Sensitive Pointer Analysis for C Programs. In: Proceedings of the 1995 ACM SIGPLAN Conference on Programming Language Design and Implementation, La Jolla, California, June 1995, pp. 1–12 (1995)
Wright, A.K.: Simple Imperative Polymorphism. Lisp and Symbolic Computation 8 4, 343–356 (1995)
Yong, S.H., Horwitz, S., Reps, T.: Pointer Analysis for Programs with Structures and Casting. In: Proceedings of the 1999 ACM SIGPLAN Conference on Programming Language Design and Implementation, Atlanta, Georgia, May 1999, pp. 91–103 (1999)
Zhang, S., Ryder, B.G., Landi, W.A.: Program Decomposition for Pointer Aliasing: A Step toward Practical Analyses. In: Fourth Symposium on the Foundations of Software Engineering (October 1996)
Zhang, S., Ryder, B.G., Landi, W.A.: Experiments with Combined Analysis for Pointer Aliasing. In: Proceedings of the ACM SIGPLAN/SIGSOFT Workshop on Program Analysis for Software Tools and Engineering, Montreal, Canada, June 1998, pp. 11–18 (1998)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2000 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Foster, J.S., Fähndrich, M., Aiken, A. (2000). Polymorphic versus Monomorphic Flow-Insensitive Points-To Analysis for C. In: Palsberg, J. (eds) Static Analysis. SAS 2000. Lecture Notes in Computer Science, vol 1824. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-45099-3_10
Download citation
DOI: https://doi.org/10.1007/978-3-540-45099-3_10
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-67668-3
Online ISBN: 978-3-540-45099-3
eBook Packages: Springer Book Archive