Skip to main content

Part of the book series: NATO Science Series ((NAII,volume 195))

Abstract

A criticism of the object-oriented style of programming is that the notion of class invariant seems to collapse in non-trivial client-supplier relationships: a supplier (“Dependent Delegate”) called from within the execution of a routine, where the invariant is not required to hold, may call back into the originating object, which it then catches in an inconsistent state. This is one of the problems arising from the application of assertion-based semantics to a model of computation involving references and the resulting possibility of dynamic aliasing.

This note suggests handling such cases by applying the basic non-objectoriented Hoare rule, instead of the version involving the invariant. It does not consider inheritance and dynamic binding.

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 169.00
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 219.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 219.99
Price excludes VAT (USA)
  • Durable hardcover 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. Eiffel (1993–2004). EiffelStudio documentation. Eiffel Software. Online at eiffel.com.

    Google Scholar 

  2. Hoare, C. (1971). Procedures and parameters: An axiomatic approach. In Engeler, E., editor, Symposium on the Semantics of Programming Languages, volume 188 of Lecture Notes in Mathematics, pages 103–116. Springer-Verlag. reprinted in C. A. R. Hoare and C. B. Jones (eds.), Essays in Computing Science, Prentice Hall International 1989.

    Google Scholar 

  3. Hoare, C. (1972). Proofs of correctness of data representations. Acta Informatica, 1:271–281. reprinted in C. A. R. Hoare and C. B. Jones (eds.), Essays in Computing Science, Prentice Hall International, 1989, pages 103–115.

    Article  MATH  Google Scholar 

  4. Leino, K. R. and Müller, P. (2004). Object invariants in dynamic contexts. In European Conference on Object-Oriented Programming, volume 3086 of LNCS, pages 491–516. Springer-Verlag.

    Google Scholar 

  5. Meyer, B. (1992). Eiffel: The Language. Prentice Hall. 2nd printing.

    Google Scholar 

  6. Meyer, B. (1997). Object-Oriented Software Construction. Prentice Hall, 2nd edition.

    Google Scholar 

  7. Müuller, P. (2002). Modular Specification and Verification of Object-Oriented Programs, volume 2262 of LNCS. Springer-Verlag.

    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

About this paper

Cite this paper

Meyer, B. (2005). The Dependent Delegate Dilemma. In: Broy, M., Grünbauer, J., Harel, D., Hoare, T. (eds) Engineering Theories of Software Intensive Systems. NATO Science Series, vol 195. Springer, Dordrecht. https://doi.org/10.1007/1-4020-3532-2_4

Download citation

  • DOI: https://doi.org/10.1007/1-4020-3532-2_4

  • Publisher Name: Springer, Dordrecht

  • Print ISBN: 978-1-4020-3530-2

  • Online ISBN: 978-1-4020-3532-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics