Abstract
Reasoning about object-oriented programs requires an appropriate technique to reflect a fundamental “general relativity” property of the approach: every operation is relative to a current object, which changes with every qualified call; such a call needs access to the context of the client object. The notion of negative variable, discussed in this article, provides a framework for reasoning about OO programs in any semantic framework. We introduce a fundamental rule describing the semantics of object-oriented calls, its specific versions for such frameworks as axiomatic (Hoare-style) logic and denotational semantics, and its application to such problems as alias analysis and the consistency of concurrent programs. The approach has been implemented as part of a verification environment for a major object-oriented language and used to perform a number of proofs and analyses.
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
Chalin, P., Kiniry, J.R., Leavens, G.T., Poll, E.: Beyond Assertions: Advanced Specification and Verification with JML and ESC/Java2. In: de Boer, F.S., Bonsangue, M.M., Graf, S., de Roever, W.-P. (eds.) FMCO 2005. LNCS, vol. 4111, pp. 342–363. Springer, Heidelberg (2006)
Cohen, E., Moskal, M., Schulte, W., Tobies, S.: Local Verification of Global Invariants in Concurrent Programs. In: Touili, T., Cook, B., Jackson, P. (eds.) CAV 2010. LNCS, vol. 6174, pp. 480–494. Springer, Heidelberg (2010)
Darvas, Á., Leino, K.R.M.: Practical reasoning about invocations and implementations of pure methods. In: Dwyer, M.B., Lopes, A. (eds.) FASE 2007. LNCS, vol. 4422, pp. 336–351. Springer, Heidelberg (2007)
Ádám, D., Müller, P.: Reasoning about Method Calls in Interface Specifications. Journal of Object Technology 5(5); Special Issue: ECOOP 2005 Workshop FTfJP, pp. 59–85 (June 2006), http://www.jot.fm/issues/issues200606/article3
Fronk, A.: An Approach to Algebraic Semantics of Object-Oriented Languages. – Software-Technology. University of Dortmund, Germany (2003), doi:2003/2682
Hoare, C.A.R.: Procedures and Parameters, An Axiomatic Approach. In: Symposium on Semantics of Algorithmic Languages, pp. 102–116 (1971), doi:10.1007/BFb0059696
Kassios, I.T., Kritikos, E.: A Discipline for Program Verification based on Backpointers and its Use in Observational Disjointness. ETH Zurich, Department of Computer Science (2012), http://dx.doi.org/10.3929/ethz-a-007560318
Rustan, K., Leino, M.: Ecstatic: An object-oriented programming language with an axiomatic semantics. Digital Equipment Corporation Systems Research Center (1996)
Meyer, B., Kogtenkov, A., Stapf, E.: Avoid a Void: The Eradication of Null Dereferencing. In: Jones, C.B., Roscoe, A.W., Wood, K.R. (eds.) Reflections on the Work of C.A.R. Hoare, pp. 189–211. Springer (2010)
Meyer, B.: Object-Oriented Software Construction, 2nd edn. Prentice Hall (1997)
Meyer, B.: Steps Towards a Theory and Calculus of Aliasing. International Journal of Software and Informatics (2011)
Meyer, B.: Towards a Calculus of Object Programs. In: Festschrift, J.B., Breitman, K., Horspool, N. (eds.). Springer (2012)
Müller, P. (ed.): Modular Specification and Verification of Object-Oriented Programs. LNCS, vol. 2262. Springer, Heidelberg (2002)
Nienaltowski, P.: Practical framework for contract-based concurrent object-oriented programming. – PhD dissertation 17061, Department of Computer Science, ETH Zurich (February 2007). Other SCOOP references at http://se.inf.ethz.ch/research/cme/
Owicki, S., Gries, D.: An axiomatic proof technique for parallel programs. Acta Informatica 6(4), 319–340 (1976)
Schoeller, B.: Aliased-based Reasoning for Object-Oriented Programs. Tech. Report, ETH Zurich (2005), http://se.ethz.ch/people/schoeller/pdfs/10-Annual_Report_CSE_ETHZ_2005.pdf
Shield, J.: Towards an Object-Oriented Refinement Calculus. - PhD Thesis, The University of Queensland (2004)
Ke, W., Liu, Z., Wang, S., Zhao, L.: A graph-based generic type system for object-oriented programs. Frontiers of Computer Science 7(1), 109–134 (2013), doi:10.1007/s11704-012-1307-8
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2014 Springer-Verlag Berlin Heidelberg
About this chapter
Cite this chapter
Meyer, B., Kogtenkov, A. (2014). Negative Variables and the Essence of Object-Oriented Programming. In: Iida, S., Meseguer, J., Ogata, K. (eds) Specification, Algebra, and Software. Lecture Notes in Computer Science, vol 8373. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-54624-2_9
Download citation
DOI: https://doi.org/10.1007/978-3-642-54624-2_9
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-54623-5
Online ISBN: 978-3-642-54624-2
eBook Packages: Computer ScienceComputer Science (R0)