Abstract
In this paper we investigate the object-oriented notion of subtyping in the context of behavioral formalisms. Behavioral formalisms are used to describe the dynamic behavior of active objects, viz. the protocols of interaction that active objects have to obey.
Subtyping in OO-formalisms is closely related to the concept of inheritance. The central issue in the choice of subtyping relations among classes is the principle of substitutability: an instance of the subtype should be usable wherever an instance of the supertype was expected. Depending on the interpretation of “usable”, we obtain a variety of subtyping relations: stronger relations, allowing sharing of subtype instances among different clients, and weaker relations, restricting the possibilities of interference of different clients on the subtype instance. The subtyping relations are taxonomically ordered in a hierarchy. Substitutability is formalized via testing scenarios, which provide alternative characterizations for the subtyping relations.
Similar content being viewed by others
References
P. America, “Designing an object-oriented programming language with behavioural subtyping,” in J. de Bakker, W. de Roever, and G. Rozenberg (Eds.), REX Workshop: Foundations of Object-Oriented Languages, Springer, 1991.
C. Balzarotti, F.D. Cindio, and L. Pomello, “Observation equivalences for the semantics of inheritance,” in P. Ciancarini and R. Gorrieri (Eds.), FMOODS '99, Formal Methods for Open Object-Based Distributed Systems, 1999.
T. Bolognesi and E. Brinksma, “Introduction to the ISO specification language LOTOS,” Computer Networks and ISDN Systems, Vol. 14, pp. 25–59, 1987.
H. Bowman, C. Briscoe-Smith, J. Derrick, and B. Strulo, “On behavioural subtyping in LOTOS,” in H. Bowman and J. Derrick (Eds.), Formal Methods for Open Object-Based Distributed Systems, Chapman & Hall, 1997, pp. 335–351.
H. Bowman and J. Derrick, “A junction between state based and behavioural specification,” in P. Ciancarini, F. Fantechi, and R. Gorrieri (Eds.), Formal Methods for Open Object-Based Distributed Systems FMOODS '99, Kluwer, pp. 213–239, 1999.
E. Brinksma, G. Scollo, and C. Steenbergen, “LOTOS specifications, their implementations and their tests,” in B. Sarikaya and G. v.Bochmann (Eds.), Protocol Specification, Testing and Verification VI, Elsevier, pp. 349–358, 1987.
S.D. Brookes, C.A.R. Hoare, and A.W. Roscoe, “A theory of communicating sequential processes,” Journal of the ACM, Vol. 31, No. 3, pp. 560–599, 1984.
E. Cusack, “Refinement, conformance and inheritance,” Formal Aspects of Computing, Vol. 3, pp. 129–141, 1991.
R. De Nicola and M. Hennessy, “Testing equivalences for processes,” Theoretical Computer Science, Vol. 34, pp. 83–133, 1984.
K.K. Dhara and G.T. Leavens, “Forcing behavioral subtyping through specification inheritance,” in Proceedings of the 18th International Conference on Software Engineering, IEEE Computer Society Press, Berlin, Germany, pp. 258–267, 1996.
K.K. Dhara and G. Leavens, “Mutation, aliasing, viewpoints, modular reasoning, and weak behavioural subtyping,” Technical Report TR01-02, Department of Computer Science, Iowa State University, 2001.
H. Ehrig and B. Mahr, Fundamentals of Algebraic Specification 1, Vol. 6, Springer, 1985.
C. Fischer, “How to combine Z with a process algebra,” in J. Bowen, A. Fett, and M. Hinchey (Eds.), ZUM'98 The Z Formal Specification Notation, Vol. 1493 of LNCS, Springer, pp. 5–23, 1998.
C. Fischer and H. Wehrheim, “Behavioural subtyping relations for object-oriented formalisms,” in T. Rus (Ed.), AMAST 2000: International Conference on Algebraic Methodology and Software Technology, Springer, pp. 469–483, 2000.
C.A.R. Hoare, Communicating Sequential Processes, Prentice-Hall, 1985.
G. Leavens and W. Weihl, “Specification and verification of object-oriented programs using supertype abstraction,” Acta Informatica, Vol. 32, pp. 705–778, 1995.
G.T. Leavens, and D. Pigozzi, “A complete algebraic characterization of behavioral subtyping,” Acta Informatica, Vol. 36, No. 8, pp. 617–663, 2000.
B. Liskov, “Data abstraction and hierarchy,” SIGPLAN Notices, Vol. 23, No. 5, pp. 17–34, 1988.
B. Liskov and J. Wing, “A behavioural notion of subtyping,” ACM Transactions on Programming Languages and Systems, Vol. 16, No. 6, pp. 1811–1841, 1994.
I. Maung, “On simulation, subtyping and substitutability in sequential object systems,” Formal Aspects of Computing, Vol. 7, pp. 620–651, 1995.
B. Meyer, Object-Oriented Software Construction, 2nd ed., ISE, 1997.
A. Mihajlova and E. Sekerinski, “Class refinement and interface refinement in object-oriented programs,” in J. Fitzgerald, C. Jones, and P. Lucas (Eds.), Formal Methods Europe, FME '97, Springer, 1997.
R. Milner, J. Parrow, and D. Walker, “A calculus of mobile processes: Part 1,” Information and Computation, Vol. 100, No. 1, pp. 1–40, 1992.
O. Nierstrasz, “Regular types for active objects,” in O. Nierstrasz and D. Tsichritzis (Eds.), Object-Oriented Software Composition, Prentice Hall, pp. 99–121, 1995.
A. Rensink and R. Gorrieri, “Action refinement as an implementation relation,” in M. Bidoit and M. Dauchet (Eds.), TAPSOFT '97: Theory and Practice of Software Development, Vol. 1214 of Lecture Notes in Computer Science, pp. 772–786, 1997.
A.W. Roscoe, The Theory and Practice of Concurrency, Prentice-Hall, 1997.
S. Rudkin, “Inheritance in LOTOS,” in K. Parker and G. Rose (Eds.), FORTE '92, Elsevier, pp. 409–424, 1992.
W. van der Aalst and T. Basten, “Life-cycle inheritance—A Petri-net-based approach,” in P. Azema and G. Balbo (Eds.), Application and Theory of Petri Nets, Springer, pp. 62–81, 1997.
J. Waldo, “The Jini architecture for network-centric computing,” Communications of the ACM, Vol. 42, No. 7, pp. 76–82, 1999.
P. Wegner and B. Zdonik, “Inheritance as an incremental modification mechanism or what like is and isn't like,” in ECOOP'88: European Conference on Object-Oriented Programming, Vol. 322 of Lecture Notes in Computer Science, Springer, 1988.
H. Wehrheim, “Behavioural subtyping and property preservation,” in S. Smith and C. Talcott (Eds.), FMOODS'00: Formal Methods for Open Object-Based Distributed Systems, Kluwer, 2000.
H. Wehrheim, “Patterns and rules for behavioural subtyping,” in M. Kim, B. Chin, S. Kang, and D. Lee (Eds.), FORTE 2001, Kluwer, pp. 335–352, 2001.
H. Wehrheim, “Checking behavioural subtypes via refinement,” in A. Rensink and B. Jacobs (Eds.), FMOODS 2002: Formal Methods for Open Object-Based Distributed Systems, Kluwer, pp. 79–93, 2002.
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Wehrheim, H. Behavioral Subtyping Relations for Active Objects. Formal Methods in System Design 23, 143–170 (2003). https://doi.org/10.1023/A:1024764232069
Issue Date:
DOI: https://doi.org/10.1023/A:1024764232069