skip to main content
10.1145/1342211.1342225acmconferencesArticle/Chapter ViewAbstractPublication PagesisecConference Proceedingsconference-collections
research-article

Class-local object invariants

Published: 19 February 2008 Publication History

Abstract

The correctness of object-oriented programs relies on object invariants. A system for verifying such programs requires a systematic method for coping with object invariants that can be violated temporarily. This paper describes a sound methodology for flexibly changing data locally in object structures, supporting programming patterns that occur frequently in practice. In more detail, to handle subclasses, previous approaches have been geared toward programs that update the fields of an object only in overridable virtual methods of the object. The enhanced methodology in this paper handles field updates in a much more flexible way. The flexibility can be applied to a field in the common case where the field is not mentioned in subclass invariants

References

[1]
Mike Barnett, Bor-Yuh Evan Chang, Robert DeLine, Bart Jacobs, and KRustan M. Leino. Boogie: A modular reusable verifier for object-oriented programs. In Frank S. de Boer, Marcello M. Bonsangue, Susanne Graf, and Willem-Paul de Roever, editors, Formal Methods for Components and Objects: 4th International Symposium, FMCO 2005, volume 4111 of Lecture Notes in Computer Science, pages 364--387. Springer, September 2006.
[2]
Mike Barnett, Robert DeLine, Manuel Fähndrich, KRustan M. Leino, and Wolfram Schulte. Verification of object-oriented programs with invariants. Journal of Object Technology, 3(6):27--56, 2004.
[3]
Mike Barnett, KRustan M. Leino, and Wolfram Schulte. The Spec# programming system: An overview. In Gilles Barthe, Lilian Burdy, Marieke Huisman, Jean-Louis Lanet, and Traian Muntean, editors, CASSIS 2004, Construction and Analysis of Safe, Secure and Interoperable Smart devices, volume 3362 of Lecture Notes in Computer Science, pages 49--69. Springer, 2005.
[4]
Mike Barnett and David A. Naumann. Friends need a bit more: Maintaining invariants over shared state. In Dexter Kozen and Carron Shankland, editors, Mathematics of Program Construction, 7th International Conference, MPC 2004, volume 3125 of Lecture Notes in Computer Science, pages 54--84. Springer, July 2004.
[5]
Andrew D. Birrell. An introduction to programming with threads. Research Report 35, Digital Equipment Corporation Systems Research Center, January 1989.
[6]
Chandrasekhar Boyapati, Robert Lee, and Martin Rinard. Ownership types for safe programming: Preventing data races and deadlocks. In Proceedings of the 2002 ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages and Applications, OOPSLA 2002, volume 37, number 11 in SIGPLAN Notices, pages 211--230. ACM, November 2002.
[7]
Dave Clarke. Object Ownership and Containment. PhD thesis, University of New South Wales, 2001.
[8]
Dave G. Clarke, John M. Potter, and James Noble. Ownership types for flexible alias protection. In Proceedings of the 1998 ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA'98), volume 33, number 10 in SIGPLAN Notices, pages 48--64. ACM, October 1998.
[9]
Ádám Darvas and KRustan M. Leino. Practical reasoning about invocations and implementations of pure methods. In Matthew B. Dwyer and Antónia Lopes, editors, Fundamental Approaches to Software Engineering, 10th International Conference, FASE 2007, volume 4422 of Lecture Notes in Computer Science, pages 336--351. Springer, March 2007.
[10]
Bart Jacobs, KRustan M. Leino, Frank Piessens, and Wolfram Schulte. Safe concurrency for aggregate objects with invariants. In Bernhard K. Aichernig and Bernhard Beckert, editors, Third IEEE International Conference on Software Engineering and Formal Methods (SEFM 2005), pages 137--146. IEEE, September 2005.
[11]
Bart Jacobs and Frank Piessens. Verification of programs with inspector methods. In Workshop on Formal Techniques for Java-like Programs (FTfJP 2006), July 2006.
[12]
Bart Jacobs, Jan Smans, Frank Piessens, and Wolfram Schulte. A statically verifiable programming model for concurrent object-oriented programs. In Zhiming Liu and Jifeng He, editors, Formal Methods and Software Engineering, 8th International Conference on Formal Engineering Methods, ICFEM 2006, volume 4260 of Lecture Notes in Computer Science, pages 420--439. Springer, November 2006.
[13]
Ioannis T. Kassios. Dynamic frames: Support for framing, dependencies and sharing without restrictions. In Jayadev Misra, Tobias Nipkow, and Emil Sekerinski, editors, FM 2006: Formal Methods, 14th International Symposium on Formal Methods, volume 4085 of Lecture Notes in Computer Science, pages 268--283. Springer, August 2006.
[14]
K. Rustan M. Leino and Peter Müller. Object invariants in dynamic contexts. In Martin Odersky, editor, ECOOP 2004 -- Object-Oriented Programming, 18th European Conference, volume 3086 of Lecture Notes in Computer Science, pages 491--516. Springer, June 2004.
[15]
K. Rustan M. Leino and Peter Müller. Modular verification of static class invariants. In John Fitzgerald, Ian J. Hayes, and Andrzej Tarlecki, editors, FM 2005: Formal Methods, International Symposium of Formal Methods Europe, volume 3582 of Lecture Notes in Computer Science, pages 26--42. Springer, July 2005.
[16]
K. Rustan M. Leino and Wolfram Schulte. Using history invariants to verify observers. In Rocco De~Nicola, editor, Programming Languages and Systems, 16th European Symposium on Programming, ESOP 2007, volume 4421 of Lecture Notes in Computer Science, pages 80--94. Springer, March 2007.
[17]
Ronald Middelkoop, Cornelis Huizing, Ruurd Kuiper, and Erik Luit. Invariants for non-hierarchical object structures. In Anamaria Martins Moreira and Leila Ribeiro, editors, Brazilian Symposium on Formal Methods, SBMF 2006, pages 233--248. SBC, September 2006.
[18]
Peter Müller. Modular Specification and Verification of Object-Oriented Programs, volume 2262 of Lecture Notes in Computer Science. Springer-Verlag, 2002.
[19]
Peter Müller and Arnd Poetzsch-Heffter. Universes: A type system for alias and dependency control. Technical Report 279, FernUniversität Hagen, 2001.
[20]
Peter Müller, Arnd Poetzsch-Heffter, and Gary T. Leavens. Modular invariants for layered object structures. Science of Computer Programming, 62:253--286, 2006.
[21]
Matthew J. Parkinson and Gavin~M. Bierman. Separation logic and abstraction. In Jens Palsberg and Martín Abadi, editors, Proceedings of the 32nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2005, pages 247--258. ACM, January 2005.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ISEC '08: Proceedings of the 1st India software engineering conference
February 2008
164 pages
ISBN:9781595939173
DOI:10.1145/1342211
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 19 February 2008

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. automation
  2. object-oriented programming
  3. specification
  4. subclassing
  5. tool support
  6. verification

Qualifiers

  • Research-article

Conference

ISEC08
Sponsor:
ISEC08: India Software Engineering Conference
February 19 - 22, 2008
Hyderabad, India

Acceptance Rates

Overall Acceptance Rate 76 of 315 submissions, 24%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)1
  • Downloads (Last 6 weeks)0
Reflects downloads up to 05 Jan 2025

Other Metrics

Citations

Cited By

View all

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media