Advertisement

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

  • Olaf Owe
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, 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.

Keywords

Object Variable Local History Verification Condition Suspension Point Code Reuse 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Notes

Acknowledgment

The anonymous referees have provided valuable feedback.

References

  1. 1.
    Ahrendt, W., Dylla, M.: A system for compositional verification of asynchronous objects. Sci. Comput. Program. 77(12), 1289–1309 (2012)CrossRefzbMATHGoogle Scholar
  2. 2.
    America, P.: A behavioural approach to subtyping in object-oriented programming languages. 443, Phillips Research Laboratories, January/April (1989)Google Scholar
  3. 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)CrossRefGoogle Scholar
  4. 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). ElsevierGoogle Scholar
  5. 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. 6.
    Dahl, O.-J.: Verifiable Programming, vol. Prentice Hall. International Series in Computer Science, New York (1992)zbMATHGoogle Scholar
  7. 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. 8.
    Din, C.C., Owe, O.: Compositional reasoning about active objects with shared futures. Formal Aspects Comput. 27, 1–22 (2014)MathSciNetzbMATHGoogle Scholar
  9. 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)MathSciNetzbMATHGoogle Scholar
  10. 10.
    Dovland, J., Johnsen, E.B., Owe, O., Steffen, M.: Lazy behavioral subtyping. J. Logic Algebraic Program. 79(7), 578–607 (2010)MathSciNetCrossRefzbMATHGoogle Scholar
  11. 11.
    Hoare, C.A.R.: An axiomatic basis of computer programming. Commun. ACM 12, 576–580 (1969)CrossRefzbMATHGoogle Scholar
  12. 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)MathSciNetCrossRefzbMATHGoogle Scholar
  13. 13.
    Leavens, G.T., Naumann, D.A.: Behavioral subtyping, specification inheritance, and modular reasoning. ACM Trans. Program. Lang. Syst. 37(4), 13 (2015)CrossRefGoogle Scholar
  14. 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. 15.
    Liskov, B.H., Wing, J.M.: A behavioral notion of subtyping. ACM Trans. Program. Lang. Syst. 6(16), 1811–1841 (1994)CrossRefGoogle Scholar
  16. 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)CrossRefzbMATHGoogle Scholar
  17. 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)CrossRefGoogle Scholar
  18. 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. 19.
    Owe, O., Ryl, I.: On combining object orientation, openness and reliability. In: Norwegian Informatics Conference (NIK 1999), Tapir (1999)Google Scholar
  20. 20.
    Parkinson, M.J., Biermann, G.M.: Separation logic, abstraction, and inheritance. In: POPL 2008, ACM (2008)Google Scholar
  21. 21.
    Pierik, C., de Boer, F.S.: A proof outline logic for object-oriented programming. Theor. Comput. Sci. 343(3), 413–442 (2005)MathSciNetCrossRefzbMATHGoogle Scholar
  22. 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)CrossRefGoogle Scholar
  23. 23.
    Polikarpova, N., Tschannen, J., Furia, C.A., Meyer, B.: Flexible invariants through semantic collaboration. CoRR, abs/1311.6329 (2013)Google Scholar
  24. 24.
    Pradel, M., Gross, T.R.: Automatic testing of sequential and concurrent substitutability. In: International Conference on Software Engineering (ICSE) (2013)Google Scholar
  25. 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. 26.
    Soundararajan, N.: A proof technique for parallel programs. Theor. Comput. Sci. 31(1–2), 13–29 (1984)MathSciNetCrossRefzbMATHGoogle Scholar
  27. 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)CrossRefGoogle Scholar
  28. 28.
    Wehrheim, H.: Behavioral subtyping relations for active objects. Formal Methods Syst. Des. 23(2), 143–170 (2003)CrossRefzbMATHGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2016

Authors and Affiliations

  1. 1.Department of InformaticsUniversity of OsloOsloNorway

Personalised recommendations