Skip to main content

Constrained matching is type safe

  • Typing
  • Conference paper
  • First Online:
Database Programming Languages (DBPL 1997)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1369))

Included in the following conference series:

Abstract

Temporally constrained matching in a persistent and declarative object-oriented system is introduced as a semantic alternative to the existing approaches to the covariance/contravariance problem. While the existing object-oriented type systems are based on subtyping, F-bounded polymorphism and matching, this language system is based entirely on inheritance, which is identified with matching. The type of matching used in this paper relies on the temporal constraint system. We prove that this constrained matching guarantees type safe substitutability even in situations where matching alone would not. This is possible only because the underlying formal system is semantically much richer than the paradigms of type systems. Its temporal constraint system can capture subtleties that go far beyond the level of expressiveness of object-oriented type systems. The temporal nature of the language and its distinctive orthogonal model of persistence make this language system successful in handling a variety of non-trivial applications.

This material is based upon work supported in part by the U.S. Army Research Office under grant no. DAAH04-96-1-0192.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. M. Abadi and Z. Manna, Temporal Logic Programming, Proceedings of Symposium on Logic Programming, IEEE Computer Society Press, pp. 4–16, 1987.

    Google Scholar 

  2. M. Abadi and L. Cardelli, On Subtyping and Matching, Proceedings of ECOOP'96, Lecture Notes in Computer Science, Springer-Verlag, Vol. 1098, pp. 145–167, 1996.

    Google Scholar 

  3. S. Alagić, A Temporal Constraint System for Object-Oriented Databases, Constraint Databases and Applications, Proceedings of CDB'97 and CP'96 Workshops, Lecture Notes in Computer Science Vol. 1191, pp. 208–218, Springer-Verlag, 1997.

    Google Scholar 

  4. S. Alagić, The ODMG Object Model: Does it Make Sense? Proceedings of the OOPSLA '97 Conference, pp. 253–270, ACM, 1997.

    Google Scholar 

  5. S. Alagić, M. Alagić, Order-Sorted Model Theory for Temporal Executable Specifications, Theoretical Computer Science 179, pp. 273–299, 1997.

    Google Scholar 

  6. S. Alagić, A Statically Typed, Temporal Object-Oriented Database Technology, Transactions on Information and Systems, IEICE, Vol. 78, pp. 1469–1476, 1995.

    Google Scholar 

  7. S. Alagić, R. Sunderraman and R. Bagai, Declarative Object-Oriented Programming: Inheritance, Subtyping and Prototyping, Proceedings of ECOOP '94, Lecture Notes in Computer Science Vol. 821, pp. 236–259, 1994.

    Google Scholar 

  8. S. Alagić,F-bounded Polymorphism for Database Programming Languages, Proceedings of the 2nd East-West Database Workshop, Workshops in Computing, pp. 125-137, Springer-Verlag, 1994.

    Google Scholar 

  9. M. Atkinson and R. Morrison, Orthogonally Persistent Object Systems, VLDB Journal, 4, pp. 319–401, (1995).

    Google Scholar 

  10. F. Bancilhon, C. Delobel and P. Kanelakis (eds), Implementing an ObjectOriented Database Management System: The Story of O2, Morgan Kauffman, 1992.

    Google Scholar 

  11. M. Baudinet, A Simple Proof of the Completeness of Temporal Logic Programming, In: L. F. Del Cerro and M. Penttonen, Intensional Logics for Programming, Studies in Logic and Computation, 1 Clarendon Press, pp. 51–83, 1992.

    Google Scholar 

  12. K. Bruce, Safe Type Checking in a Statically Typed Object-Oriented Programming Language, Proceedings of the ACM Conference on Functional Programming, pp. 285–298, ACM 1993.

    Google Scholar 

  13. K. Bruce, J. Crabtree, T. P. Murtagh and R. van Gent, A. Dimock and R. Muller, Safe and Decidable Type Checking in an Object-Oriented Language, Proceedings of the OOPSLA Conference, pp. 29–46, 1993.

    Google Scholar 

  14. K. Bruce, A. Schuett, and R. van Gent, PolyTOIL: a Type-Safe Polymorphic Object Oriented Language, Proceedings of ECOOP '95, Lecture Notes in Computer Science Vol. 952, pp. 27–51, Springer-Verlag, 1996.

    Google Scholar 

  15. J. Boyland and G. Castagna, Type-Safe Compilation of Covariant Specialization: a Practical Case, Proceedings of ECOOP '96, Lecture Notes in Computer Science, Vol. 1098, pp. 3–25, Springer-Verlag, 1996.

    Google Scholar 

  16. G. Castagna, Covariance and Contravariance: Conflict Without a Cause, ACM Transactions on Programming Languages and Systems, Vol. 17 (3) pp. 431–447, 1995.

    Google Scholar 

  17. P. Canning, W. Cook, W. Hill, W. Olthoff and J.C. Mitchell, F-Bounded Polymorphism for Object-Oriented Programming, Proceedings of the ACM Conference on Functional Programming Languages and Computer Architecture, pp. 273–280, 1989.

    Google Scholar 

  18. W. R. Cook, W. L. Hill and P. S. Canning, Inheritance is not Subtyping, Proceedings of the ACM Conference on Principles of Programming Languages, pp. 125–135, 1990.

    Google Scholar 

  19. W. R. Cook, A Proposal for Making Eiffel Type Safe, The Computer Journal, Vol. 32, no. 4, pp. 305–311, 1989.

    Google Scholar 

  20. A. Gawecki and F. Matthes, Integrating Subtyping, Matching and Type Quantification: A Practical Perspective, Proceedings of ECOOP '96, Lecture Notes in Computer Science, Vol. 1098, pp. 25–47, Springer-Verlag, 1996.

    Google Scholar 

  21. J. Goguen, Types as Theories, In: G.M. Reed, A. W. Roscoe and R.F. Wachter, Topology and Category Theory in Computer Science, pp. 357–390, Clarendon Press, 1991.

    Google Scholar 

  22. J. Goguen and J. Meseguer, Unifying Functional, Object-Oriented and Relational Programming with Logical Semantics, In B. Shriver and P. Wegner, editors, Research Directions in Object-Oriented Programming, pp. 417–477, MIT Press, 1987.

    Google Scholar 

  23. M. Fisher, A Survey of Concurrent METATEM-The Language and its Applications, Proceedings of the 2nd Temporal Logic Conference, Lecture Notes in AI, pp. 48–66, Springer-Verlag, 1994.

    Google Scholar 

  24. J. L. Fiadeiro and T. Maibaum, Sometimes “Tomorrow” is “ Sometime” Action Refinement in a Temporal Logic of Objects, Proc. of the 2nd International Temporal Logic Conference, Lecture Notes in AI, pp. 48–66, Springer-Verlag, 1994.

    Google Scholar 

  25. M. Kifer, G. Lausen, and J.Wu, Logical Foundation of Object-Oriented and Frame-Based Languages, Technical Report 93/06, Department of Computer Science, SUNY at Stony Brook, to appear in the Journal of the ACM.

    Google Scholar 

  26. F. Kroger, Temporal Logic of Programs, EATCS Monograph on Theoretical Computer Science, New York, Springer-Verlag, 1987.

    Google Scholar 

  27. B. Liskov and J. M. Wing, A behavioral notion of subtyping, ACM Transactions on Programming Languages and Systems, 16, pp. 1811–1841, 1994.

    Google Scholar 

  28. J. Meseguer, Solving the Inheritance Anomaly in Concurrent Object-Oriented Programming, Proceedings of ECOOP '93, Lecture Notes in Computer Science, Vol. 707, pp. 220–246, 1993.

    Google Scholar 

  29. B. Meyer. Eiffel: the Language, Prentice-Hall, 1992.

    Google Scholar 

  30. R. Wieringa, W. de Jonge and P. Spruit., Roles and Dynamic Subclasses: A Modal Logic Approach, Proceedings of the ECOOP Conference, Lecture Notes in Computer Science, Vol. 821, pp. 33–59, 1994.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Sophie Cluet Rick Hull

Rights and permissions

Reprints and permissions

Copyright information

© 1998 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Alagić, S. (1998). Constrained matching is type safe. In: Cluet, S., Hull, R. (eds) Database Programming Languages. DBPL 1997. Lecture Notes in Computer Science, vol 1369. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-64823-2_6

Download citation

  • DOI: https://doi.org/10.1007/3-540-64823-2_6

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-64823-9

  • Online ISBN: 978-3-540-68534-0

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics