Abstract
In this paper we address the problem of performing a class static analysis in a modular fashion, i.e. by just analyzing the class code and not the full program. In particular we show two things: the first one is how starting from a class C we can derive an approximation Ca to be used either as a class documentation or as a tester for a client using C; the second one is how to discover, in a fully automatic way, a class invariant. Two methods for class invariant computation are presented, proved correct and their usage is discussed.
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
M. Abadi and L. Cardelli. A Theory of Objects. Springer-Verlag, New York, 1996.
A. Aggarwal and K.H. Randall. Related field analysis. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI’01). ACM, June 2001.
M. Atkinson, F. Bancilhon, D. DeWitt, K. Dittrich, D. Maier, and S. Zdonik. The object-oriented database system manifesto. In Proceedings of the First International Conference on Deductive and Object-Oriented Databases (DOOD’ 89), pages 223–240, Kyoto, Japan, 1989.
B. Blanchet. Escape analysis for object oriented languages. Application to Java. In 14th ACM Conference on Object-Oriented Programming, Systems, Languages and Applications (OOPSLA’99), pages 20–34, Denver, Colorado, November 1999.
L. Cardelli. A semantics of multiple inheritance. In G. Kahn, D. MacQueen, and G. Plotkin, editors, Semantics of Data Types, volume 173 of Lecture Notes in Computer Science, pages 51–67. Springer-Verlag, 1984. Full version in Information and Computation, 76(2/3): 138–164, 1988.
R. Chatterjee, B.G. Ryder, and W.A. Landi. Relevant context inference. In 26th ACM Symposium on Principles of Programming Languages (POPL’99), ACMSIGPLAN Notices, pages 133–146, New York, NY, USA, 1999. ACM Press.
W. Cook and J. Palsberg. A denotational semantics of inheritance and its correctness. Information and Computation, 114(2): 329–350, 1 November 1994.
P. Cousot and R. Cousot. Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In 4th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL’77), pages 238–252, Los Angeles, California, 1977. ACM Press, New York, NY.
P. Cousot and R. Cousot. Relational abstract interpretation of higher-order functional programs. JTASPEFL’91, Bordeaux. BIGRE, 74:33–36, October 1991.
P. Cousot and R. Cousot. Abstract interpretation frameworks. Journal of Logic and Computation, 2(4):511–547, 1992.
P. Cousot and R. Cousot. Modular static program analysis, invited paper. In R.N. Horspool, editor, Proceedings of the Eleventh International Conference on Compiler Construction (CC 2002), pages 159–178, Grenoble, France, April 6–14 2002. LNCS 2304, Springer, Berlin.
P. Cousot and R. Cousot. Systematic design of program transformation frameworks by abstract interpretation. In 29th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 2002), pages 178–190, Portland, Oregon, January 2002. ACM Press, New York, NY.
P. Cousot and N. Halbwachs. Automatic discovery of linear restraints among variables of a program. In 5th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL’78), pages 84–97, Tucson, Arizona, 1978. ACM Press, New York, NY.
D.L. Detlefs, K. Rustan, M. Leino, G. Nelson, and Saxe J.B. Extended static checking. Research Report #159, Compaq Systems Research Center, Palo Alto, USA, December 1998.
M. Ernst. Dynamically Discovering Likely Program Invariants. PhD thesis, University of Washington Department of Computer Science and Engineering, 2002.
M. Handjieva and S. Tzolovski. Refining static analyses by trace-based partitioning using control flow. In Proceedings of the Static Analysis Symposium (SAS’98), volume 1503 of Lectures Notes in Computer Science, pages 200–215, 1998.
M. Huisman, B. Jacobs, and J. van den Berg. A case study in class library verification: Java’s vector class. In A. Moreira and D. Demeyer, editors, Object-Oriented Technology: ECOOP’99 Workshop Reader, volume 1743 of Lecture Notes in Computer Science, pages 109–110, Lisbon, Portugal, June 1999. Springer-Verlag.
T. Jensen and F. Spoto. Class analysis of object-oriented programs through abstract interpretation. In F. Honsell and M. Miculan, editors, Proceedings of the FOSSACS 2001 Conference, volume 2030 of Lecture Notes in Computer Science, pages 261–275, Genova, Italy, April 2001. Springer-Verlag.
G.T. Leavens, A.L. Baker, and C. Ruby. Preliminary Design of JML: A Behavioral Interface Specification Language for Java, October 2002. www.cs.iastate.edu/~leavens/JML/prelimdesign/prelimdesign_toc.html.
T. Lindholm and F. Yellin. The Java Virtual Machine Specification. The Java Series. Addison Wesley Longman, Inc., 2nd edition, April 1999.
L. Mauborgne. Abstract interpretation using typed decision graphs. Science of Computer Programming, 31(1):91–112, May 1998.
Microsoft. Microsoft C# Language Specifications. Microsoft Press, 2001.
J. Palsberg and M.I. Schwartzbach. Object-Oriented Type Systems. John Wiley & Sons, Chichester, 1994.
I. Pollet, B. Le Charlier, and A. Cortesi. Distinctness and sharing domains for static analysis of Java programs. In Proceedings of ECOOP’ 01, volume 2072 of Lectures Notes in Computer Science, pages 77–98. Springer-Verlag, 2001.
C. Probst. Modular control flow analysis for libraries. In Proceedings of the Static Analysys Symposium (SAS 2002), volume 2477, pages 165–179. Springer-Verlag, 2002.
G. Ramalingam, A. Warshavsky, J. Field, D. Goyal, and M. Sagiv. Deriving specialized program analyses for certifying component-client conformance. In ACM SIGPLAN 2002 Conference on Programming Language Design and Implementation (PLDI 2002), volume 37,5 of ACM SIGPLAN Notices, pages 83–94, New York, June 17–19 2002. ACM Press.
A. Rountev, A. Milanova, and B.G. Ryder. Points-to analysis for Java using annotated constraints. In 16th ACM Conference on Object Oriented Programming, Systems, Languages and Applications (OOPSLA’01), pages 43–55. ACM, November 2001.
J. Rumbaugh, I. Jacobson, and G. Booch. The Unified Modeling Language Reference Manual. Addison-Wesley, Reading, Massachusetts, USA, 1st edition, 1999.
S. Khurshid, D. Marinov, and D. Jackson. An analyzable annotation language. In 17th ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 2002), November 2002.
Sun Microsystem, Inc. javadoc Tool Home Page, 2002. http://java.sun.com/j2se/javadoc/.
K. Zee and M. Rinard. Write barrier removal by static analysis. In 17th Annual ACM Conference on Object-Oriented Programming, Systems, Languages and Applications (OOPSLA 2002). ACM, 2002.
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
Logozzo, F. (2003). Class-Level Modular Analysis for Object Oriented Languages. In: Cousot, R. (eds) Static Analysis. SAS 2003. Lecture Notes in Computer Science, vol 2694. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-44898-5_3
Download citation
DOI: https://doi.org/10.1007/3-540-44898-5_3
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-40325-8
Online ISBN: 978-3-540-44898-3
eBook Packages: Springer Book Archive