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.
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- I. Jacobson, G. Booch, and J.E. Rumbaugh. The Unified Software Development Process. Addison-Wesley, 1999. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Cross Ref
- 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 Scholar
Digital Library
- B. Meyer. Object-Oriented Software Construction. Prentice Hall Professional Technical Reference, 2nd edition, 1997. Google Scholar
Digital Library
- P. Müller. Modular Specification and Verification of Object-Oriented Programs. PhD thesis, FernUniversität Hagen, 2001.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
- 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 Scholar
Digital Library
- K. Østerbye. Design of a class library for association relationships. In ACM SIGPLAN Symposium on Library-Centric Software Design (LCSD'07), 2007. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- A. Wren. Relationships for Object-oriented Programming Languages. PhD thesis, University of Cambridge, November 2007.Google Scholar
Index Terms
- Modular reasoning about invariants over shared state with interposed data members
Recommendations
Modular reasoning about invariants over shared state with interposed data members: (abstract only)
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 ...
Teaching predicates and invariants on shared data structures in concurrent programming
DCP '12: Proceedings of the 2012 workshop on Developing competency in parallelism: techniques for education and trainingIn concurrent programing, threads may communicate via data structures that can be embedded in shared objects or monitors. In this paper we outline the basis for a short module that can be used to teach better programming of such monitors by emphasizing ...





Comments