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
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsReferences
Ahrendt, W., Dylla, M.: A system for compositional verification of asynchronous objects. Sci. Comput. Program. 77(12), 1289–1309 (2012)
America, P.: A behavioural approach to subtyping in object-oriented programming languages. 443, Phillips Research Laboratories, January/April (1989)
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)
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
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)
Dahl, O.-J.: Verifiable Programming, vol. Prentice Hall. International Series in Computer Science, New York (1992)
Dhara, K.K., Leavens, G.T.: Forcing behavioural subtyping through specification inheritance. In: 18th International Conference on Software Engineering, pp. 258–267. IEEE (1996)
Din, C.C., Owe, O.: Compositional reasoning about active objects with shared futures. Formal Aspects Comput. 27, 1–22 (2014)
Din, C.C., Owe, O.: A sound and complete reasoning system for asynchronous communication with shared futures. JLAP 83(5–6), 360–383 (2014)
Dovland, J., Johnsen, E.B., Owe, O., Steffen, M.: Lazy behavioral subtyping. J. Logic Algebraic Program. 79(7), 578–607 (2010)
Hoare, C.A.R.: An axiomatic basis of computer programming. Commun. ACM 12, 576–580 (1969)
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)
Leavens, G.T., Naumann, D.A.: Behavioral subtyping, specification inheritance, and modular reasoning. ACM Trans. Program. Lang. Syst. 37(4), 13 (2015)
Leino, K.R.M., Wallenburg, A.: Class-local Object Invariants. In: 1st India Software Engineering Conference (ISEC 2008), pp. 57–66. ACM (2008)
Liskov, B.H., Wing, J.M.: A behavioral notion of subtyping. ACM Trans. Program. Lang. Syst. 6(16), 1811–1841 (1994)
Middelkoop, R., Huizing, C., Kuiper, R., Luit, E.J.: Invariants for non-hierarchical object structures. Electron. Notes Theor. Comput. Sci. 195, 211–229 (2008)
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)
Owe, O.: Verifiable programming of object-oriented and distributed systems. In: From Action System to Distributed Systems, pp. 61–80. Taylor & Francis (2016)
Owe, O., Ryl, I.: On combining object orientation, openness and reliability. In: Norwegian Informatics Conference (NIK 1999), Tapir (1999)
Parkinson, M.J., Biermann, G.M.: Separation logic, abstraction, and inheritance. In: POPL 2008, ACM (2008)
Pierik, C., de Boer, F.S.: A proof outline logic for object-oriented programming. Theor. Comput. Sci. 343(3), 413–442 (2005)
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)
Polikarpova, N., Tschannen, J., Furia, C.A., Meyer, B.: Flexible invariants through semantic collaboration. CoRR, abs/1311.6329 (2013)
Pradel, M., Gross, T.R.: Automatic testing of sequential and concurrent substitutability. In: International Conference on Software Engineering (ICSE) (2013)
Soundarajan, N., Fridella, S.: Inheritance: From code reuse to reasoning reuse. In: Fifth International Conference on Software Reuse (ICSR5), pp. 206–215. IEEE (1998)
Soundararajan, N.: A proof technique for parallel programs. Theor. Comput. Sci. 31(1–2), 13–29 (1984)
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)
Wehrheim, H.: Behavioral subtyping relations for active objects. Formal Methods Syst. Des. 23(2), 143–170 (2003)
Acknowledgment
The anonymous referees have provided valuable feedback.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights 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)