skip to main content
10.1145/1707790.1707794acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
research-article

Modular reasoning about invariants over shared state with interposed data members

Published:19 January 2010Publication History

ABSTRACT

Reasoning about object-oriented programs is difficult since such programs usually involve aliasing, and it is not easy to identify the ways objects can relate to each other and thus to confine a program's heap. In this paper, we address this problem in the context of a relationship-based programming language. In relationship-based programming languages, relationships are first-class citizens and allow a precise description of inter-object relationships. Relationships enforce a modularization discipline that is closer to the natural modularity inherent to many problem domains and that yields, as a result, program heaps that are DAGs. We further describe a mechanism, member interposition, that leverages the new modularization discipline and supports encapsulation of fields of shared objects. We have implemented the described modularization discipline and the mechanism of member interposition in the context of Rumer, a relationship-based programming language with support for contract specifications. We discuss the implications of member interposition for the modular verification of object invariants with an example. Relationships and interposed members provide an alternative to ownership type systems.

References

  1. A. Albano, G. Ghelli, and R. Orsini. A relationship mechanism for a strongly typed object-oriented database programming language. In 17th International Conference on Very Large Data Bases (VLDB'91), pages 565--575. Morgan Kaufmann Publishers Inc., 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. S. Balzer, T.R. Gross, and P. Eugster. A relational model of object collaborations and its use in reasoning about relationships. In 21st European Conference on Object-Oriented Programming (ECOOP'07), volume 4609 of Lecture Notes in Computer Science, pages 323--346. Springer, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. M. Barnett, R. DeLine, M. Fähndrich, K.R.M. Leino, and W. Schulte. Verification of object-oriented programs with invariants. Journal of Object Technology (JOT), 3(6):27--56, 2004.Google ScholarGoogle Scholar
  4. M. Barnett, K.R.M. Leino, and W. Schulte. The Spec# programming system: An overview. In International Workshop on Construction and Analysis of Safe, Secure, and Interoperable Smart Devices (CASSIS'04), volume 3362 of Lecture Notes in Computer Science, pages 49--69. Springer, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. M. Barnett and D.A. Naumann. Friends need a bit more: Maintaining invariants over shared state. In 7th International Conference on Mathematics of Program Construction (MPC'04), Lecture Notes in Computer Science, pages 54--84. Springer, 2004.Google ScholarGoogle ScholarCross RefCross Ref
  6. D. Bäumer, D. Riehle, W. Siberski, and M. Wulf. The role object pattern. In 4th Conference on Pattern Languages of Programs (PLoP'97), 1997.Google ScholarGoogle Scholar
  7. G.M. Bierman, E. Meijer, and M. Torgersen. Lost in translation: Formalizing proposed extensions to Spec#. In 22nd Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA'07), pages 479--498. ACM, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. G.M. Bierman and A. Wren. First-class relationships in an object-oriented language. In 19th European Conference on Object-Oriented Programming (ECOOP'05), volume 3586 of Lecture Notes in Computer Science, pages 262--286. Springer, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. C. Boyapati, R. Lee, and M. Rinard. Ownership types for safe programming: Preventing data races and deadlocks. In 17th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA'02), pages 211--230, New York, NY, USA, 2002. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. L. Burdy, Y. Cheon, D.R. Cok, M.D. Ernst, J.R. Kiniry, G.T. Leavens, K.R.M. Leino, and E. Poll. An overview of JML tools and applications. International Journal on Software Tools for Technology Transfer (STTT'05), 7(3):212--232, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. N.R. Cameron, S. Drossopoulou, J. Noble, and M.J. Smith. Multiple ownership. In 22nd Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA'07), pages 441--460. ACM, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. P.P.-S. Chen. The entity-relationship model -- toward a unified view of data. ACM Transactions on Database Systems (TODS), 1(1):9--36, March 1976. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. D.G. Clarke and S. Drossopoulou. Ownership, encapsulation and the disjointness of type and effect. In 17th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA'02), pages 292--310. ACM, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. D.G. Clarke, J.M. Potter, and J. Noble. Ownership types for flexible alias protection. In 13th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA'98), pages 48--64. ACM, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. W. Dietl, S. Drossopoulou, and P. Müller. Generic universe types. In 21st European Conference on Object-Oriented Programming (ECOOP'07), volume 4609 of Lecture Notes in Computer Science, pages 28--53. Springer, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. I. Jacobson, G. Booch, and J.E. Rumbaugh. The Unified Software Development Process. Addison-Wesley, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. G.T. Leavens, A.L. Baker, and C. Ruby. Preliminary design of JML: A behavioral interface specification language for Java. Technical Report 98-06-rev29, Iowa State University, 2006.Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. K.R.M. Leino and P. Müller. Object invariants in dynamic contexts. In 18th European Conference on Object-Oriented Programming (ECOOP'04), volume 3086 of Lecture Notes in Computer Science, pages 491--516. Springer, 2004.Google ScholarGoogle ScholarCross RefCross Ref
  19. K.R.M. Leino and W. Schulte. Using history invariants to verify observers. In 16th European Symposium on Programming (ESOP'07), Lecture Notes in Computer Science, pages 80--94. Springer, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. B. Meyer. Object-Oriented Software Construction. Prentice Hall Professional Technical Reference, 2nd edition, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. P. Müller. Modular Specification and Verification of Object-Oriented Programs. PhD thesis, FernUniversität Hagen, 2001.Google ScholarGoogle Scholar
  22. P. Müller, A. Poetzsch-Heffter, and G.T. Leavens. Modular invariants for layered object structures. Science of Computer Programming, 62(3):253--286, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. S. Nelson, D.J. Pearce, and J. Noble. First class relationships for OO languages. In 6th International Workshop on Multiparadigm Programming with Object-Oriented Languages, 2008.Google ScholarGoogle Scholar
  24. J. Noble, J. Vitek, and J. Potter. Flexible alias protection. In 12th European Conference on Object-Oriented Programming (ECOOP'98), volume 1445 of Lecture Notes in Computer Science, pages 158--185. Springer, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. K. Østerbye. Design of a class library for association relationships. In ACM SIGPLAN Symposium on Library-Centric Software Design (LCSD'07), 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. D.J. Pearce and J. Noble. Relationship aspects. In 5th International Conference on Aspect-Oriented Software Development (AOSD '06), pages 75--86. ACM, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. J. Rumbaugh. Relations as semantic constructs in an object-oriented language. In 2nd ACM Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA '87), pages 466--481. ACM, 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. A. Wren. Relationships for Object-oriented Programming Languages. PhD thesis, University of Cambridge, November 2007.Google ScholarGoogle Scholar

Index Terms

  1. Modular reasoning about invariants over shared state with interposed data members

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      PLPV '10: Proceedings of the 4th ACM SIGPLAN workshop on Programming languages meets program verification
      January 2010
      70 pages
      ISBN:9781605588902
      DOI:10.1145/1707790

      Copyright © 2010 ACM

      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]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 19 January 2010

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      Overall Acceptance Rate18of25submissions,72%

      Upcoming Conference

      POPL '25

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader