Skip to main content

Reasoning About Inheritance and Unrestricted Reuse in Object-Oriented Concurrent Systems

  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 9681))

Abstract

Code reuse is a fundamental aspect of object-oriented programs, and in particular, the mechanisms of inheritance and late binding provide great flexibility in code reuse, without semantical limitations other than type-correctness. However, modular reasoning about late binding and inheritance is challenging, and formal reasoning approaches place semantical restrictions on code reuse in order to preserve properties from superclasses. The overall aim of this paper is to develop a formal framework for modular reasoning about classes and inheritance, supporting unrestricted reuse of code, as well as of specifications. The main contribution is a Hoare-style logic supporting free reuse, worked out for a high-level concurrent object-oriented language. We also show results on verification reuse, based on a combination of Hoare-style logic and static checking. An example illustrates the difference to comparable reasoning formalisms.

This work was supported by the project IoTSec of the Norwegian Research Council.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   69.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   89.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

Learn about institutional subscriptions

References

  1. Ahrendt, W., Dylla, M.: A system for compositional verification of asynchronous objects. Sci. Comput. Program. 77(12), 1289–1309 (2012)

    Article  MATH  Google Scholar 

  2. America, P.: A behavioural approach to subtyping in object-oriented programming languages. 443, Phillips Research Laboratories, January/April (1989)

    Google Scholar 

  3. Barnett, M., Leino, K.R.M., Schulte, W.: The Spec# programming system: an overview. In: Barthe, G., Burdy, L., Huisman, M., Lanet, J.-L., Muntean, T. (eds.) CASSIS 2004. LNCS, vol. 3362, pp. 49–69. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  4. Burdy, L., Cheon, Y., Cok, D.R., Ernst, M., Kiniry, J., Leavens, G.T., Leino, K.R.M., Poll, E.: An overview of JML tools and applications. In: FMICS 2003, Electron. Notes Theor. Comput. Sci. 80, 73–89 (2003). Elsevier

    Google Scholar 

  5. Chin, W.-N., David, H., Nguyen, H.-H., Qin, S.: Enhancing modular OO verification with separation logic. In: POPL 2008, pp. 87–99. ACM (2008)

    Google Scholar 

  6. Dahl, O.-J.: Verifiable Programming, vol. Prentice Hall. International Series in Computer Science, New York (1992)

    MATH  Google Scholar 

  7. Dhara, K.K., Leavens, G.T.: Forcing behavioural subtyping through specification inheritance. In: 18th International Conference on Software Engineering, pp. 258–267. IEEE (1996)

    Google Scholar 

  8. Din, C.C., Owe, O.: Compositional reasoning about active objects with shared futures. Formal Aspects Comput. 27, 1–22 (2014)

    MathSciNet  MATH  Google Scholar 

  9. Din, C.C., Owe, O.: A sound and complete reasoning system for asynchronous communication with shared futures. JLAP 83(5–6), 360–383 (2014)

    MathSciNet  MATH  Google Scholar 

  10. Dovland, J., Johnsen, E.B., Owe, O., Steffen, M.: Lazy behavioral subtyping. J. Logic Algebraic Program. 79(7), 578–607 (2010)

    Article  MathSciNet  MATH  Google Scholar 

  11. Hoare, C.A.R.: An axiomatic basis of computer programming. Commun. ACM 12, 576–580 (1969)

    Article  MATH  Google Scholar 

  12. Johnsen, E.B., Owe, O., Creol, I.C.Y.: A type-safe object-oriented model for distributed concurrent systems. Theor. Comp. Sci. 365(1–2), 23–66 (2006)

    Article  MathSciNet  MATH  Google Scholar 

  13. Leavens, G.T., Naumann, D.A.: Behavioral subtyping, specification inheritance, and modular reasoning. ACM Trans. Program. Lang. Syst. 37(4), 13 (2015)

    Article  Google Scholar 

  14. Leino, K.R.M., Wallenburg, A.: Class-local Object Invariants. In: 1st India Software Engineering Conference (ISEC 2008), pp. 57–66. ACM (2008)

    Google Scholar 

  15. Liskov, B.H., Wing, J.M.: A behavioral notion of subtyping. ACM Trans. Program. Lang. Syst. 6(16), 1811–1841 (1994)

    Article  Google Scholar 

  16. Middelkoop, R., Huizing, C., Kuiper, R., Luit, E.J.: Invariants for non-hierarchical object structures. Electron. Notes Theor. Comput. Sci. 195, 211–229 (2008)

    Article  MATH  Google Scholar 

  17. Mikhajlov, L., Sekerinski, E.: A study of the fragile base class problem. In: Jul, E. (ed.) ECOOP ’98 – Object-Oriented Programming. LNCS, vol. 1445, pp. 355–382. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  18. Owe, O.: Verifiable programming of object-oriented and distributed systems. In: From Action System to Distributed Systems, pp. 61–80. Taylor & Francis (2016)

    Google Scholar 

  19. Owe, O., Ryl, I.: On combining object orientation, openness and reliability. In: Norwegian Informatics Conference (NIK 1999), Tapir (1999)

    Google Scholar 

  20. Parkinson, M.J., Biermann, G.M.: Separation logic, abstraction, and inheritance. In: POPL 2008, ACM (2008)

    Google Scholar 

  21. Pierik, C., de Boer, F.S.: A proof outline logic for object-oriented programming. Theor. Comput. Sci. 343(3), 413–442 (2005)

    Article  MathSciNet  MATH  Google Scholar 

  22. Poetzsch-Heffter, A., Müller, P.O.: A programming logic for sequential Java. In: Swierstra, S.D. (ed.) ESOP 1999. LNCS, vol. 1576, pp. 162–176. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  23. Polikarpova, N., Tschannen, J., Furia, C.A., Meyer, B.: Flexible invariants through semantic collaboration. CoRR, abs/1311.6329 (2013)

    Google Scholar 

  24. Pradel, M., Gross, T.R.: Automatic testing of sequential and concurrent substitutability. In: International Conference on Software Engineering (ICSE) (2013)

    Google Scholar 

  25. Soundarajan, N., Fridella, S.: Inheritance: From code reuse to reasoning reuse. In: Fifth International Conference on Software Reuse (ICSR5), pp. 206–215. IEEE (1998)

    Google Scholar 

  26. Soundararajan, N.: A proof technique for parallel programs. Theor. Comput. Sci. 31(1–2), 13–29 (1984)

    Article  MathSciNet  MATH  Google Scholar 

  27. Summers, A.J., Drossopoulou, S.: Considerate reasoning and the composite design pattern. In: Barthe, G., Hermenegildo, M. (eds.) VMCAI 2010. LNCS, vol. 5944, pp. 328–344. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  28. Wehrheim, H.: Behavioral subtyping relations for active objects. Formal Methods Syst. Des. 23(2), 143–170 (2003)

    Article  MATH  Google Scholar 

Download references

Acknowledgment

The anonymous referees have provided valuable feedback.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Olaf Owe .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Springer International Publishing Switzerland

About this paper

Cite this paper

Owe, O. (2016). Reasoning About Inheritance and Unrestricted Reuse in Object-Oriented Concurrent Systems. In: Ábrahám, E., Huisman, M. (eds) Integrated Formal Methods. IFM 2016. Lecture Notes in Computer Science(), vol 9681. Springer, Cham. https://doi.org/10.1007/978-3-319-33693-0_14

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-33693-0_14

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-33692-3

  • Online ISBN: 978-3-319-33693-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics