Skip to main content

More Flexible Object Invariants with Less Specification Overhead

  • Conference paper
Software Engineering and Formal Methods (SEFM 2014)

Abstract

Object invariants are used to specify valid object states. They play a central role for reasoning about the correctness of object-oriented software. Current verification methodologies require additional specifications to support the flexibility of modern object oriented programming concepts. This increases the specification effort and represents a new source of error. The presented methodology reduces the currently required specification overhead. It is based on an automatic control flow analysis between code positions violating invariants and code positions requiring their validity. This analysis helps to prevent specification errors, possible in other approaches. Furthermore, the presented methodology distinguishes between valid and invalid invariants within one object. This allows a (more) flexible definition of invariants.

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 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.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

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Summers, A.J., Drossopoulou, S., Müller, P.: The need for flexible object invariants. In: International Workshop on Aliasing, Confinement and Ownership in Object-Oriented Programming, pp. 1–9. ACM (2009)

    Google Scholar 

  2. Leino, K.R.M., Müller, P.: Object invariants in dynamic contexts. In: Odersky, M. (ed.) ECOOP 2004. LNCS, vol. 3086, pp. 491–515. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  3. Barnett, M., Fähndrich, M., Müller, P., Leino, K.R.M., Schulte, W., Venter, H.: Specification and verification: The spec# experience (2009)

    Google Scholar 

  4. Hoare, C.A.R.: An axiomatic basis for computer programming. Communications of the ACM 12(10), 576–580 (1969)

    Article  MATH  Google Scholar 

  5. Müller, P., Poetzsch-Heffter, A., Leavens, G.T.: Modular invariants for layered object structures. Sci. Comput. Program. 62(3), 253–286 (2006)

    Article  MATH  Google Scholar 

  6. Meyer, B.: Eiffel: The Language. Prentice-Hall, Inc., Upper Saddle River (1992)

    MATH  Google Scholar 

  7. Leavens, G.T., Baker, A.L., Ruby, C.: Jml: a java modeling language. In: Formal Underpinnings of Java Workshop, at OOPSLA 1998 (1998)

    Google Scholar 

  8. Huizing, K., Kuiper, R.: Verification of object oriented programs using class invariants. In: Maibaum, T. (ed.) FASE 2000. LNCS, vol. 1783, pp. 208–221. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  9. Dietl, W., Müller, P.: Object ownership in program verification. In: Clarke, D., Noble, J., Wrigstad, T. (eds.) Aliasing in Object-Oriented Programming. LNCS, vol. 7850, pp. 289–318. Springer, Heidelberg (2013)

    Chapter  Google Scholar 

  10. Müller, P.: Modular Specification and Verification of Object-Oriented Programs. LNCS, vol. 2262. Springer, Heidelberg (2002)

    MATH  Google Scholar 

  11. Müller, P.: Reasoning about object structures using ownership. In: Meyer, B., Woodcock, J. (eds.) Verified Software. LNCS, vol. 4171, pp. 93–104. Springer, Heidelberg (2008)

    Google Scholar 

  12. Barnett, M., Naumann, D.A.: Friends need a bit more: Maintaining invariants over shared state. In: Kozen, D. (ed.) MPC 2004. LNCS, vol. 3125, pp. 54–84. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  13. Lu, Y., Potter, J., Xue, J.: Validity invariants and effects. In: Ernst, E. (ed.) ECOOP 2007. LNCS, vol. 4609, pp. 202–226. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  14. Barnett, M., DeLine, R., Fähndrich, M., Leino, K.R.M., Schulte, W.: Verification of object-oriented programs with invariants. Journal of Object Technology 3, 2004 (2004)

    Google Scholar 

  15. Leavens, G.T., Muller, P.: Information hiding and visibility in interface specifications. In: Proceedings of the 29th International Conference on Software Engineering, ICSE 2007, pp. 385–395. IEEE Computer Society, Washington, DC (2007)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Springer International Publishing Switzerland

About this paper

Cite this paper

Huster, S. et al. (2014). More Flexible Object Invariants with Less Specification Overhead. In: Giannakopoulou, D., Salaün, G. (eds) Software Engineering and Formal Methods. SEFM 2014. Lecture Notes in Computer Science, vol 8702. Springer, Cham. https://doi.org/10.1007/978-3-319-10431-7_25

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-10431-7_25

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-10430-0

  • Online ISBN: 978-3-319-10431-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics