Abstract
Contracts were introduced by Helm et al. as a high level construct for explicitly specifying interactions among groups of objects. This paper describes further developments and application of the Contract construct. We show how Contracts can be used to represent classic algorithms as large grained reusable object oriented abstractions, how these algorithms can be customized through Contract refinement and how they are reused through Contract conformance. The example algorithm used throughout is the classic graph depth first traversal algorithm. This algorithm is represented as a Contract which is then refined to specify algorithms which number connected regions of graphs and which check graphs for cycles. Changes to the Contract language are introduced and we discuss some new problems resulting from the simultaneous reuse of related contracts.
Work supported in part by IBM T.J. Watson Research Center and in part by the National Science Foundation under grants CCR-9102578 (Software Engineering) and CDA-9015692 (Research Instrumentation).
Preview
Unable to display preview. Download preview PDF.
References
Constantin Arapis. Specifying Object Life-Cycles. In Dennis Tsichritzis, editor, Object Management, pages 133–195. Centre Universitaire D'Informatique, Genève, 1990.
Kent Beck and Ward Cunningham. A laboratory for teaching object oriented thinking. In Object-Oriented Programming Systems, Languages and Applications Conference, in Special Issue of SIGPLAN Notices, pages 1–6, New Orleans, LA, 1989. ACM.
Lucy Berlin. When objects collide: Experiences with reusing multiple class heirarchies. In Object-Oriented Programming Systems, Languages and Applications Conference/European Conference on Object-Oriented Programming, in Special Issue of SIGPLAN Notices, pages 181–211, Ottatwa, Canada, 1990. ACM.
Ted Biggerstaff and Charles Richter. Reusability framework, assesment and directions. IEEE Software, pages 41–49, July 1987.
Judy Bishop. The Effect of Data Abstraction on Loop Programming Techniques. IEEE Transactions on Software Engineering, 16(4):389–402, April 1990.
Grady Booch. Object-Oriented Design With Applications. Benjamin/Cummings Publishing Company, Inc., 1991.
Peter Deutsch. Reusability in the Smalltalk-80 Programming System. In ITT Proc. Workshop on Reusability in Programming, pages 72–82, Newport, RI, 1983.
B. Hailpern and H. Ossher. Extending Objects to Support Multiple Interfaces and Access Control. IEEE Transactions on Software Engineering, 16(11), November 1990.
A. Richard Helm, Ian M. Holland, and Dipayan Gangopadhyay. Contracts: Specifying Behavioral Compositions in Object-Oriented Systems. In Object-Oriented Programming Systems, Languages and Applications Conference, in Special Issue of SIGPLAN Notices, pages 169–180, Ottowa, 1990. ACM Press. joint conference ECOOP/OOPSLA.
Ralph E. Johnson and Brian Foote. Designing reusable classes. Journal of Object-Oriented Programming, 1(2):22–35, June/July 1988.
W. L. Johnson and E. Soloway. PROUST: Knowledge-based program understanding. IEEE Transactions on Software Engineering, 11:267–275, 1985. reprinted in: C. Rich and R.C. Waters, eds., Readings in Artificial Intelligence and Software Engineering (Morgan Kaufmann, Los Altos, CA. 1986).
T. Capers Jones. Reusability in Programming: A Survey of the State of the Art. IEEE Transactions on Software Engineering, 10(5):488–494, September 1984.
Gail E. Kaiser and David Garlan. MELDing Data Flow and Object-Oriented Programming. In Object-Oriented Programming Systems, Languages and Applications Conference, in Special Issue of SIGPLAN Notices, volume 22, pages 254–267, Orlando, Florida, 1987. ACM SIGPLAN Notices.
Shmuel Katz, Charles A. Richter, and Khe-Sing The. PARIS: A System for Reusing Partially Interpreted Schemas. In International Conference on Software Engineering, pages 377–385, 1987.
Charles Krueger. Models of reuse in software engineering. Technical Report CMS-CS-89-188, Department of Computer Science, Carnegie Mellon University, December 1989.
Karl Lieberherr. Object-oriented programming with class dictionaries. Journal on Lisp and Symbolic Computation, 1(2):185–212, 1988.
Mark A. Linton, John M. Vlissides, and Paul R. Calder. Composing User Interfaces using Interviews. IEEE Computer Magazine, pages 8–22, February 1989.
Bertrand Meyer. Tools for the new culture: Lessons from the design of the Eiffel libraries. Communications of the ACM, 33(9):68–88, September 1990.
Jens Palsberg and Michael I. Schwartzbach. Type substitution for objectoriented programming. In Object-Oriented Programming Systems, Languages and Applications Conference/European Conference on Object-Oriented Programming, in Special Issue of SIGPLAN Notices, pages 151–159, Ottatwa, Canada, 1989. ACM.
Barbara Pernici. Class Design and Meta-Design. In Dennis Tsichritzis, editor, Object Management, pages 133–195. Centre Universitaire D'Informatique, Genève, 1990.
Ruben Prieto-Diaz and James M. Neighbors. Module interconnection languages. Journal of Systems and Software, 6(4):307–334, November 1986.
Ramana Rao. Implementation Reflection in Silica. In European Conference on Object-Oriented Programming. Springer Verlag, 1991.
T. Reenskaug and E. Nordhagen. The Description of Complex Object-Oriented Systems: Version 1. Technical report, Senter for Industriforskning, Oslo, Norway., 1989.
C. Rich and H. E. Shrobe. Initial report on a Lisp programmer's apprentice. In D. R. Barstow, H. E. Shrobe, and E. Sandewall, editors, Interactive Programming Environments, pages 443–463. McGraw-Hill, 1984.
Charles Rich and Richard C. Waters. The Programmers Apprentice. Frontier Series. ACM Press, 1990.
Rebecca Wirfs-Brock and Brian Wilkerson. Object-oriented design: A responsibility-driven approach. In Object-Oriented Programming Systems, Languages and Applications Conference, in Special Issue of SIGPLAN Notices, pages 71–76, New Orleans, LA, 1989. ACM.
Rebecca J. Wirfs-Brock and Ralph E. Johnson. A survey of current research in object-oriented design. Communications of the ACM, 33(9): 104–124, September 1990.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1992 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Holland, I.M. (1992). Specifying reusable components using contracts. In: Madsen, O.L. (eds) ECOOP ’92 European Conference on Object-Oriented Programming. ECOOP 1992. Lecture Notes in Computer Science, vol 615. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0053043
Download citation
DOI: https://doi.org/10.1007/BFb0053043
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-55668-8
Online ISBN: 978-3-540-47268-1
eBook Packages: Springer Book Archive