Academia.eduAcademia.edu

Outline

A complete algebraic characterization of behavioral subtyping

2000, Acta Informatica

https://doi.org/10.1007/S002360050168

Abstract

We present a model-theoretic study of correct behavioral subtyping for rst-order, deterministic, abstract data types with immutable objects. For such types, we give a new algebraic criterion for proving correct behavioral subtyping that is both necessary and su cient. This proof technique handles incomplete speci cations by allowing proofs of correct behavioral subtyping to be based on comparison with one of several paradigmatic models. It compares a model to a selected paradigm with a generalization of the usual notion of simulation relations. This generalization is necessary for speci cations that are not term-generated and that use multiple dispatch. However, we also show that the usual notion of simulation gives a necessary and su cient proof technique for the special cases of term-generated speci cations and speci cations that only use single dispatch.

References (27)

  1. Pierre America, Designing an Object-Oriented P r ogramming Langauge with Behavioral Sub- typing, F oundations of Object-Oriented Languages, REX School Workshop, Noordijkerhout, The Netherlands, May June 1990 J. W. de Bakker and W. P. d e R o e v er and G. Rozen- berg, eds., Lecture Notes in Computer Science, vol. 489, Springer-Verlag, New York, 1991, pp. 60 90.
  2. Kim Bruce, Luca Cardelli, Giuseppe Castagna, The Hopkins Object Group, Gary T. Leavens, and Benjamin Pierce, On Binary Methods, Theory and Practice of Object Systems 1 1995, no. 3, John, Wiley and Sons, Inc., 221-242.
  3. Kim B. Bruce and Peter Wegner, An A lgebraic Model of Subtype and Inheritance, Advances in Database Programming Languages F. Ban cilhon and P. Buneman, eds., Addison-Wesley, Reading, Mass., 1990, pp. 75 96.
  4. Luca Cardelli, A Semantics of Multiple Inheritance, Information and Computation 76 1988, 138 164.
  5. Giuseppe Castagna, Object-Oriented P r ogramming: A Uni ed F oundation, Progress in The- oretical Computer Science Series, Birkhauser, Boston, 1997.
  6. Krishna Kishore Dhara and Gary T. Leavens, Weak Behavioral Subtyping for Types with Mutable Objects, Mathematical Foundations of Programming Semantics, Eleventh Annual Conference S. Brookes, M. Main, A. Melton and M. Mislove, eds., Electronic Notes in Theoretical Computer Science, vol. 1, Elsevier, 1995.
  7. Krishna Kishore Dhara and Gary T. Leavens, Forcing Behavioral Subtyping Through Speci - cation Inheritance, Proceedings of the 18th International Conference on Software Engineering, Berlin, Germany, IEEE Computer Society Press, 1996, pp. 258 267.
  8. Joseph A. Goguen, Realization is Universal, Math. Systems Theory 6 1973, 359 374.
  9. Joseph A. Goguen, Order Sorted A lgebras, T echnical Report 14, UCLA Computer Science Department 1978, Semantics and Theory of Computation Series.
  10. Joseph Goguen and Jos e Meseguer, Universal Realization, Persistent Interconnection and Implementation of Abstract Modules, Proceedings, 9th International Conference on Automata, Languages and Programming M. Nielsen and E.M. Schmidt, eds., Lecture Notes in Computer Science, vol. 140, Springer-Verlag, New York, 1982, pp. 265 281.
  11. Joseph Goguen and Jos e Meseguer, Initiality, Induction and Computability, Algebraic Meth- ods in Semantics M. Nivat and J. Reynolds, eds., Cambridge University Press, Cambridge, 1985, pp. 459 541.
  12. Joseph Goguen and Jos e Meseguer, Order-Sorted A lgebra I: Equational Deduction for Multiple Inheritance, Overloading, Exceptions and Partial Operations, Theor. Comp. Sci. 105 1987, 217 273.
  13. Joseph Goguen and Jos e Meseguer, Order-Sorted A lgebra Solves the Constructor-Selector, Multiple Representation and Coercion Problems, Symposium on Logic in Computer Science, Ithaca, NY, IEEE, 1987, pp. 18 29.
  14. A. Jung and J. Tiuryn, A new characterization of lambda de nability, T yped lambda calculus and applications. International Conference on Typed Lambda Calculus and Applications, TLCA '93 March 1993, Utrecht, The Netherlands Proceedings. M. Bezem and J. F. Groote, eds., Lecture Notes in Computer Science, vol. 598, Springer-Verlag, Berlin, 1993, pp. 245 257.
  15. Gary T. Leavens and Todd D. Millstein, Multiple Dispatch as Dispatch on Tuples, OOPSLA '98 Conference Proceedings, ACM SIGPLAN Notices, vol. 33, ACM, New York, 1998, pp. 374- 387.
  16. Gary T. Leavens and Don Pigozzi, Typed Homomorphic Relations Extended with Subtypes, Mathematical Foundations of Programming Semantics '91 S. Brookes, ed., Lecture Notes in Computer Science, vol. 598, Springer-Verlag, New York, 1992, pp. 144 167.
  17. Gary T. Leavens and Don Pigozzi, The Behavior-Realization Adjunction and Generalized Homomorphic Relations, Theor. Comp. Sci. 177 1997, 183 216, An extended version is available as 18 .
  18. Gary T. Leavens and Don Pigozzi, The Behavior-Realization Adjunction and Generalized Ho- momorphic Relations, Department of Computer Science, Iowa State University, TR 94-18b. Available by anonymous ftp from ftp.cs.iastate.edu and by e-mail from alamanc@cs.iastate.edu September 1994, revised September 1994, July 1996.
  19. Gary T. Leavens and Don Pigozzi, An exact algebraic characterization of behavioral subtyping, Preprint n um. 315, Centre de Recerca Matem atica, Istitut d'Estudis Catalans Desembre 1995.
  20. Gary T. Leavens and Don Pigozzi, Class-Based and Algebraic Models of Objects, US Brazil Joint W orkshops on the Formal Foundations of Software Systems Rance Cleaveland, Michael Mislove and Philip Mulry, eds., Electronic Notes in Theoretical Computer Science, vol. 14, Elsevier, 1999, pp. 183 216, http: www.elsevier.nl locate entcs volume14.html.
  21. Gary T. Leavens and William E. Weihl, Reasoning about Object-oriented P r ograms that use Subtypes extended abstract, ECOOP OOPSLA '90 Proceedings N. Meyrowitz, ed., ACM SIGPLAN Notices, vol. 25, ACM, October, 1990, pp. 212 223.
  22. Gary T. Leavens and William E. Weihl, Speci cation and Veri cation of Object-Oriented Programs Using Supertype A bstraction, Acta Informatica 32 1995, no. 8, 705 778.
  23. Barbara Liskov and Jeannette Wing, A Behavioral Notion of Subtyping, A CM Transactions on Programming Languages and Systems 16 1994, no. 11, 1811 1841.
  24. John C. Reynolds, Using Category Theory to Design Implicit Conversions and Generic Opera- tors, Semantics-Directed Compiler Generation, Proceedings of a Workshop, Aarhus, Denmark N. D. Jones, ed., Lecture Notes in Computer Science, vol. 94, Springer-Verlag, New York, 1980, pp. 211 258.
  25. K. Sieber, Reasoning about sequential functions via logical relations, Applications of Cate- gories in Computer Science. Proceedings of the LMS Symposium, Durham 1991 M. P. F our- man, P. T. Johnstone, and A. M. Pitts, eds., London Mathematical Society Lecture Note Series, vol. 177, Cambridge University Press, Cambridge, 1992, pp. 258 269.
  26. Oliver Schoett, Behavioural Correctness of Data Representations, Science of Computer Pro- gramming 14 June, 1990, no. 1, 43 57.
  27. Philip Wadler and Stephen Blott, How to make ad-hoc Polymorphism less ad hoc, Conference Record of the Sixteenth Annual ACM Symposium on Principles of Programming Languages, Austin, Texas, ACM, New York, 1989, pp. 60 76.