Skip to main content

Semantic Hierarchy Refactoring by Abstract Interpretation

  • Conference paper
Verification, Model Checking, and Abstract Interpretation (VMCAI 2006)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 3855))

Abstract

A semantics-based framework is presented for the definition and manipulation of class hierarchies for object-oriented languages. The framework is based on the notion of observable of a class, i.e., an abstraction of its semantics when focusing on a behavioral property of interest. We define a semantic subclass relation, capturing the fact that a subclass preserves the behavior of its superclass up to a given (tunable) observed property. We study the relation between syntactic subclass, as present in mainstream object-oriented languages, and the notion of semantic subclass. The approach is then extended to class hierarchies, leading to a semantics-based modular treatment of a suite of basic observable-preserving operators on hierarchies. We instantiate the framework by presenting effective algorithms that compute a semantic superclass for two given classes, that extend a hierarchy with a new class, and that merge two hierarchies by preserving semantic subclass relations.

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. Bracha, G., Cook, W.R.: Mixin-based inheritance. In: 5th ACM Conference on Object-Oriented Programming, Systems, Languages and Applications (OOPSLA 1990). SIGPLAN Notices, vol. 25(10), pp. 303–311 (1990)

    Google Scholar 

  2. Cardelli, L.: A semantics of multiple inheritance. In: Plotkin, G., MacQueen, D.B., Kahn, G. (eds.) Semantics of Data Types 1984. LNCS, vol. 173, pp. 51–67. Springer, Heidelberg (1984); Full version in Information and Computation, 76(2/3),138–164 (1988)

    Google Scholar 

  3. Castagna, G.: Covariance and contravariance: conflict without a cause. ACM Transactions on Programming Languages and Systems 17(3), 431–447 (1995)

    Article  Google Scholar 

  4. Cook, W.R., Hill, W., Canning, P.S.: Inheritance is not subtyping. In: Proceedings of the 17th annual ACM SIGPLAN-SIGACT Symposium on Principles of programming languages (POPL 1990), January 1990. ACM Press, New York (1990)

    Google Scholar 

  5. Cook, W.R., Palsberg, J.: A denotational semantics of inheritance and its correctness. Information and Computation 114(2), 329–350 (1994)

    Article  MathSciNet  Google Scholar 

  6. Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stei, C.: Introduction to Algorithms, 2nd edn. The MIT Press and McGraw-Hill Book Company (2001)

    Google Scholar 

  7. Cortesi, A., Logozzo, F.: Abstract interpretation-based verification of non functional requirements. In: Jajodia, S., Wijesekera, D. (eds.) Data and Applications Security 2005. LNCS, vol. 3654, pp. 49–62. Springer, Heidelberg (2005)

    Google Scholar 

  8. Cousot, P.: Methods and logics for proving programs. In: van Leeuwen, J. (ed.) Formal Models and Semantics. Handbook of Theoretical Computer Science, vol. B, ch.15, pp. 843–993. Elsevier Science, Amsterdam (1990)

    Google Scholar 

  9. Cousot, P.: Types as abstract interpretations, invited paper. In: 24th ACM Symposium on Principles of Programming Languages (POPL ’97), January 1997, pp. 316–331. ACM Press, New York (1997)

    Chapter  Google Scholar 

  10. Cousot, P., Cousot, R.: Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: 4th ACM Symposium on Principles of Programming Languages (POPL 1977), January 1977, pp. 238–252. ACM Press, New York (1977)

    Chapter  Google Scholar 

  11. Cousot, P., Cousot, R.: Systematic design of program analysis frameworks. In: 6th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 1979), pp. 269–282. ACM Press, New York (1979)

    Chapter  Google Scholar 

  12. Cousot, P., Cousot, R.: Systematic design of program transformation frameworks by abstract interpretation. In: 29th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 2002), January 2002, pp. 178–190. ACM Press, New York (2002)

    Chapter  Google Scholar 

  13. Dahl, O., Nygaard, K.: SIMULA - an ALGOL-based simulation language. Communications of the ACM (CACM) 9(9), 671–678 (1966)

    Article  MATH  Google Scholar 

  14. Detlefs, D.L., Rustan, K., Leino, M., Nelson, G., Saxe J.B.: Extended static checking. Research Report #159, Compaq Systems Research Center, Palo Alto, USA (December 1998)

    Google Scholar 

  15. Goldberg, A., Robson, D.: Smalltalk-80: The Language and Its Implementation. Addison-Wesley, Reading (1983)

    MATH  Google Scholar 

  16. Granger, P.: Static analysis of linear congruence equalities among variables of a program. In: Dassow, J., Kelemen, J. (eds.) IMYCS 1990. LNCS, vol. 464, pp. 169–192. Springer, Heidelberg (1990)

    Google Scholar 

  17. Leavens, G.T., Baker, A.L., Ruby, C.: Preliminary Design of JML: A Behavioral Interface Specification Language for Java (November 2003)

    Google Scholar 

  18. Liskov, B.H., Wing, J.M.: A behavioral notion of subtyping. ACM Transactions on Programming Languages and Systems 16(6), 1811–1841 (1994)

    Article  Google Scholar 

  19. Logozzo, F.: Class-level modular analysis for object oriented languages. In: Cousot, R. (ed.) SAS 2003. LNCS, vol. 2694, pp. 37–54. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  20. Logozzo, F.: An approach to behavioral subtyping based on static analysis. In: Proceedings of the International Workshop on Test and Analysis of Component Based Systems (TACoS 2004), April 2004. Electronic Notes in Theoretical Computer Science. Elsevier Science, Amsterdam (2004)

    Google Scholar 

  21. Logozzo, F.: Automatic inference of class invariants. In: Steffen, B., Levi, G. (eds.) VMCAI 2004. LNCS, vol. 2937, pp. 211–222. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  22. Logozzo, F.: Modular Static Analysis of Object-oriented languges. PhD thesis, École Polytecnique (2004)

    Google Scholar 

  23. Logozzo, F.: Class invariants as abstract interpretation of trace semantics. Computer Languages, Systems and Structures (2005) (to appear)

    Google Scholar 

  24. Logozzo, F., Cortesi, A.: Semantic class hierarchies by abstract intepretation. Technical Report CS-2004-7, Dipartimento di Informatica, Università Ca’ Foscari di Venezia, Italy (2004)

    Google Scholar 

  25. Meyer, B.: Object-Oriented Software Construction, 2nd edn. Professional Technical Reference. Prentice Hall, Englewood Cliffs (1997)

    MATH  Google Scholar 

  26. Miné, A.: The octagon abstract domain. In: AST 2001 in WCRE 2001, October 2001, pp. 310–319. IEEE CS Press, Los Alamitos (2001)

    Google Scholar 

  27. NetBeans.org and Sun Mycrosystem, Inc. Netbeans IDE (2004)

    Google Scholar 

  28. Odifreddi, P.: Classical Recursion Theory. Elsevier, Amsterdam (1999)

    MATH  Google Scholar 

  29. Palsberg, J., Schwartzbach, M.I.: Object-Oriented Type Systems. John Wiley & Sons, Chichester (1994)

    MATH  Google Scholar 

  30. Pollet, I., Le Charlier, B., Cortesi, A.: Distinctness and sharing domains for static analysis of Java programs. In: Knudsen, J.L. (ed.) ECOOP 2001. LNCS, vol. 2072, pp. 77–98. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  31. Sagiv, S., Reps, T.W., Wilhelm, R.: Parametric shape analysis via 3-valued logic. ACM Transactions on Programming Languages and Systems 24(3), 217–288 (2002)

    Article  Google Scholar 

  32. Snelting, G., Tip, F.: Semantics-based composition of class hierarchies. In: Magnusson, B. (ed.) ECOOP 2002. LNCS, vol. 2374, pp. 562–584. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  33. Streckenbach, M., Snelting, G.: Refactoring class hierarchies with KABA. In: Proceedings of the 19th ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 2004). ACM Press, New York (2004)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2005 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Logozzo, F., Cortesi, A. (2005). Semantic Hierarchy Refactoring by Abstract Interpretation. In: Emerson, E.A., Namjoshi, K.S. (eds) Verification, Model Checking, and Abstract Interpretation. VMCAI 2006. Lecture Notes in Computer Science, vol 3855. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11609773_21

Download citation

  • DOI: https://doi.org/10.1007/11609773_21

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-31139-3

  • Online ISBN: 978-3-540-31622-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics