Abstract
We present a new type system and associated type checker, analysis, and model extraction algorithms for automatically extracting models that capture aspects of a program’s design. Our type system enables the developer to place a token on each object; this token serves as the object’s representative during the analysis and model extraction. The polymorphism in our type system enables the use of general-purpose classes whose instances may serve different purposes in the computation; programmers may also hide the details of internal data structures by placing the same token on all of the objects in these data structures.
Our combined type system and analysis provide the model extraction algorithms with sound heap aliasing information. Our algorithms can therefore extract both structural models that characterize object referencing relationships and behavioral models that capture indirect interactions mediated by objects in the heap. Previous approaches, in contrast, limited by an absence of aliasing information, have focused on control-flow interactions that take place at procedure call boundaries. We have implemented our type checker, analysis, and model extraction algorithms and used them to automatically extract design models. Our experience indicates that it is straightforward to produce the token annotations and that the extracted models provide useful insight into the structure and behavior of the program.
This research was supported in part by a fellowship from Canada’s Natural Sciences and Engineering Research Council, DARPA/AFRL Contract F33615-00-C-1692, NSF Grant CCR-0086154, NSF Grant CCR-0073513, NSF Grant CCR-0209075, an Eclipse Innovation Grant, and the Singapore-MIT Alliance.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Aldrich, J., Chambers, C., Notkin, D.: Archjava: Connecting software architecture to implementation. In: 24th International Conference on Software Engineering, Orlando, FL (May 2002)
Aldrich, J., Kostadinov, V., Chambers, C.: Alias annotations for program understanding. In: Proceedings of the 17th Annual Conference on Object-Oriented Programming Systems, Languages and Applications, Seattle, WA (November 2002)
Andersen, L.O.: Program Analysis and Specialization for the C Programming Language. PhD thesis, DIKU, University of Copenhagen (May 1994)
Bloch, J., et al.: JSR175: A metadata facility for the JavaTM programming language (April 2002)
Bokowski, B., Vitek, J.: Confined types. In: Proceedings of the 14th Annual Conference on Object-Oriented Programming Systems, Languages and Applications, Denver, CO (November 1999)
Boyapati, C., Lee, R., Rinard, M.: Ownership types for safe programming: Preventing data races and deadlocks. In: Proceedings of the 17th Annual Conference on Object-Oriented Programming Systems, Languages and Applications, Seattle, WA (November 2002)
Boyapati, C., Rinard, M.: A parameterized type system for race-free Java programs. In: Proceedings of the 16th Annual Conference on Object-Oriented Programming Systems, Languages and Applications, Tampa Bay, Florida (October 2001)
Choi, J., Burke, M., Carini, P.: Efficient flow-sensitive interprocedural computation of pointer-induced aliases and side effects. In: Conference Record of the Twentieth Annual Symposium on Principles of Programming Languages, Charleston, SC. ACM, New York (1993)
Clarke, D., Drossopoulou, S.: Ownership, encapsulation and disjointness of type and effect. In: Proceedings of the 17th Annual Conference on Object-Oriented Programming Systems, Languages and Applications, Seattle, WA (November 2002)
Clarke, D., Potter, J., Noble, J.: Ownership types for flexible alias protection. In: Proceedings of the 13th Annual Conference on Object-Oriented Programming Systems, Languages and Applications, Vancouver, Canada (October 1998)
Das, M.: Unification-based pointer analysis with directional assignments. In: Proceedings of the SIGPLAN 2000 Conference on Program Language Design and Implementation, Vancouver, Canada (June 2000)
D’Souza, D., Wills, A.: Objects, Components, and Frameworks with UML: the catalysis approach. Addison-Wesley, Reading (1998)
Ellson, J., Ganser, E., Koutsofios, E., North, S.: Graphviz, Available from http://www.research.att.com/sw/tools/graphviz
Emami, M., Ghiya, R., Hendren, L.: Context-sensitive interprocedural pointsto analysis in the presence of function pointers. In: Proceedings of the SIGPLAN 1994 Conference on Program Language Design and Implementation, Orlando, FL, pp. 242–256. ACM, New York (1994)
Fahndrich, M., Foster, J., Su, Z., Aiken, A.: Partial online cycle elimination in inclusion constraint graphs. In: Proceedings of the SIGPLAN 1998 Conference on Program Language Design and Implementation, Montreal, Canada (June 1998)
Heintze, N., Tardieu, O.: Ultra-fast aliasing using CLA: A million lines of code in a second. In: Proceedings of the SIGPLAN 2001 Conference on Program Language Design and Implementation, Snowbird, UT (June 2001)
Jackson, D., Rinard, M.: The future of software analysis. In: Finkelstein, A. (ed.) The Future of Software Engineering. ACM, New York (2000)
Jackson, D., Waingold, A.: Lightweight extraction of object models from bytecode. In: 21st International Conference on Software Engineering, Los Angeles, CA (May 1999)
Kuncak, V., Lam, P., Rinard, M.: Role analysis. In: Proceedings of the 29th Annual ACM Symposium on the Principles of Programming Languages, Portland, OR, 299 (January 2002)
Landi, W., Ryder, B.: A safe approximation algorithm for interprocedural pointer aliasing. In: Proceedings of the SIGPLAN 1992 Conference on Program Language Design and Implementation, San Francisco, CA (June 1992)
Murphy, G., Notkin, D., Sullivan, K.: Software reflexion models: Bridging the gap between source and high-level models. In: Proceedings of the ACM SIGSOFT 1995 Symposium on the Foundations of Software Engineering,Washington, DC (October 1995)
O’Callahan, R.: Generalized Aliasing as a Basis for Program Analysis Tools. PhD thesis, School of Computer Science, Carnegie Mellon Univ., Pittsburgh, PA (November 2000)
O’Callahan, R., Jackson, D.: Lackwit: A program understanding tool based on type inference. In: 1997 International Conference on Software Engineering, Boston, MA (May 1997)
Ruf, E.: Context-insensitive alias analysis reconsidered. In: Proceedings of the SIGPLAN 1995 Conference on Program Language Design and Implementation, La Jolla, CA (June 1995)
Salcianu, A., Rinard, M.: Pointer and escape analysis for multithreaded programs. In: Proceedings of the 8th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, Snowbird, UT (June 2001)
Shapiro, M., Horwitz, S.: Fast and accurate flow-insensitive points-to analysis. In: Proceedings of the 24th Annual ACM Symposium on the Principles of Programming Languages, Paris, France (January 1997)
Steensgaard, B.: Points-to analysis in almost linear time. In: Proceedings of the 23rd Annual ACM Symposium on the Principles of Programming Languages, St. Petersburg Beach, FL (January 1996)
Warmer, J., Kieppe, A.: The Object Constraint Language: Precise Modeling with UML. Addison-Wesley, Reading (1998)
Wilson, R., Lam, M.: Efficient context-sensitive pointer analysis for C programs. In: Proceedings of the SIGPLAN 1995 Conference on Program Language Design and Implementation, La Jolla, CA. ACM, New York (1995)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2003 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Lam, P., Rinard, M. (2003). A Type System and Analysis for the Automatic Extraction and Enforcement of Design Information. In: Cardelli, L. (eds) ECOOP 2003 – Object-Oriented Programming. ECOOP 2003. Lecture Notes in Computer Science, vol 2743. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-45070-2_13
Download citation
DOI: https://doi.org/10.1007/978-3-540-45070-2_13
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-40531-3
Online ISBN: 978-3-540-45070-2
eBook Packages: Springer Book Archive