Representing object identity in a pure functional language

  • Atsushi Ohori
Object-Oriented Databases
Part of the Lecture Notes in Computer Science book series (LNCS, volume 470)


One of the central concepts in the field of object-oriented databases is object identity, which nicely captures mutability, sharing and cyclic structures. Although the concept is intuitively clear, its precise semantics has not yet been well established. This seems to be a major obstacle to achieve a clean integration of object-oriented databases and other paradigms of database programming in a modern type system of a programming language. This paper attempts to establish a mathematical model for object identity in a framework of typed pure functional languages.

We argue that the properties of object identity are accurately captured by references as they are implemented in Standard ML. We then present a method to interpret an impure higher-order functional language with references in a typed pure functional language using Moggi's recent result on the categorical structure of monads. This establishes a precise semantics to the primitive operations for references and allows us to analyze various property of object identity. We investigate the interaction between set data types and object identity. Since the interpretation is shown to preserve all the properties of the existing data structures for databases, it enables us to integrate object identity with various existing data models within a type system of a programming language. We show that object identity and a generalized relational model can be uniformly integrated in a programming language.


Object Identity Type Inference Functional Language Type Constructor Primitive Operation 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [ABD+89]
    [ABD+89] M.P. Atkinson, F. Bancilhon, D. DeWitt, K. Dittrick, D. Maier, and S. Zdonik. The object-oriented database system manifesto. In Proc. the First Deductive and Object-Oriented Database Conference, Kyoto, Japan, December 1989.Google Scholar
  2. [AH87]
    S. Abiteboul and R. Hull. IFO: A formal semantic database model. ACM Transactions on Database Systems, 12(4):525–565, December 1987.CrossRefGoogle Scholar
  3. [AK89]
    S. Abiteboul and P. Kanellakis. Object identity as query language primitive. In Proc. ACM SIGMOD Conference, pages 159–173, Portland, Oregon, June 1989.Google Scholar
  4. [AW85]
    S.K. Abdali and D.S. Wise. Storeless semantics for ALGOL-style block structure. In Proc. Conference on Mathematical Foundation of Programming Semantics, LNCS 239, 1985.Google Scholar
  5. [Ban88]
    F. Bancilhon. Object-oriented database systems. In Proc. ACM Symposium on Principles of Database Systems, Austin, Texas, March 1988.Google Scholar
  6. [BBKV87]
    F. Bancilhon, T. Briggs, S. Khoshafian, and P. Valduriez. FAD, a powerful and simple database language. In Proc. VLDB Conference, pages 97–105, 1987.Google Scholar
  7. [Bro85]
    S.D. Brookes. A fully abstract semantics and a proof system for an Algol-like langauge with aliasing. In Proc. Conference on Mathematical Foundation of Programming Semantics, LNCS 239, pages 59–100, 1985.Google Scholar
  8. [Car84]
    L. Cardelli. A semantics of multiple inheritance. In Semantics of Data Types, LNCS 173, 1984.Google Scholar
  9. [CDJS86]
    M. Carey, D. DeWitt, Richardson J., and E Sheikta. Object and file management in the EXODUS extensible database system. In Proc. 12th VLDB Conference, Kyoto, Japan, August 1986.Google Scholar
  10. [CM84]
    G. Copeland and D. Maier. Making smalltalk a database system. In Proc. of ACM SIGMOD Conference, pages 316–325. ACM, June 1984.Google Scholar
  11. [Cop85]
    M. Coppo. A completeness theorem for recursively defined types. In Automata, Languages and Programming, 12th Colloquium, LNCS 194, pages 120–129, July 1985.Google Scholar
  12. [Cou83]
    B. Courcelle. Fundamental properties of infinite trees. Theoretical Computer Science, 25:95–169, 1983.CrossRefGoogle Scholar
  13. [CW85]
    L. Cardelli and P. Wegner. On understanding types, data abstraction, and polymorphism. Computing Surveys, 17(4):471–522, December 1985.CrossRefGoogle Scholar
  14. [Dam85]
    L. Damas. Type Assignment in Programming Languages. PhD thesis, Department of Computer Science, University of Edinburgh, 1985.Google Scholar
  15. [Dat81]
    C.J. Date. An Introduction to Database System Vol 1. Addison-Wesley, third edition, 1981.Google Scholar
  16. [DM82]
    L. Damas and R. Milner. Principal type-schemes for functional programs. In Proc. 9th ACM Symposium on Principles of Programming Languages, pages 207–212, 1982.Google Scholar
  17. [FF87]
    M. Felleisen and D. P. Friedman. A calculus for assignment in higher-order languages. In Proc. 14th ACM Symposium on Principles of Programming Languages, pages 314–325, 1987.Google Scholar
  18. [Fri73]
    H. Friedman. Equations between functionals. In Lecture Notes in Mathematics 453, pages 22–33. Springer-Verlag, 1973.Google Scholar
  19. [Hin69]
    R. Hindley. The principal type-scheme of an object in combinatory logic. Trans. American Mathematical Society, 146:29–60, December 1969.Google Scholar
  20. [HMT88]
    R. Harper, R. Milner, and M. Tofte. The definition of Standard ML (version 2). LFCS Report Series ECS-LFCS-88-62, Department of Computer Science, University of Edinburgh, August 1988.Google Scholar
  21. [HS86]
    J. R. Hindley and J. P. Seldin. Introduction to Combinators and λ-Calculus. Cambridge University Press, 1986.Google Scholar
  22. [KC86]
    S.N. Khoshafian and G.p. Copeland. Object identity. In Proc. OOPSLA, pages 406–416, September 1986.Google Scholar
  23. [KV84]
    G.M. Kuper and M.Y. Vardi. A new approach to database logic. In Proc. ACM PODS, pages 86–96, 1984.Google Scholar
  24. [LRV88]
    C. Lecluse, P. Richard, and F. Velez. O 2, an object-oriented data model. In Proc. ACM SIGMOD Conference, pages 424–434, 1988.Google Scholar
  25. [Mai83]
    D. Maier. The Theory of Relational Databases. Computer Science Press, 1983.Google Scholar
  26. [MH88]
    J. C. Mitchell and R. Harper. The essence of ML. In Proc. 15th ACM Symposium on Principles of Programming Languages, pages 28–46, San Diego, California, January 1988.Google Scholar
  27. [Mil78]
    R. Milner. A theory of type polymorphism in programming. Journal of Computer and System Sciences, 17:348–375, 1978.CrossRefGoogle Scholar
  28. [Mog89]
    E. Moggi. Computational lambda-calculus and monads. In Proc. Symposium on Logic in Computer Science, 1989.Google Scholar
  29. [OB88]
    A. Ohori and P. Buneman. Type inference in a database programming language. In Proc. ACM Conference on LISP and Functional Programming, pages 174–183, Snowbird, Utah, July 1988.Google Scholar
  30. [OBBT89]
    A. Ohori, P. Buneman, and V. Breazu-Tannen. Database programming in Machiavelli — a polymorphic language with static type inference. In Proc. ACM SIGMOD conference, pages 46–57, Portland, Oregon, May — June 1989.Google Scholar
  31. [OBS86]
    P O'Brien, B Bullis, and C. Schaffert. Persistent and shared objects in Trellis/Owl. In Proc. of 1986 IEEE International Workshop on Object-Oriented Database Systems., 1986.Google Scholar
  32. [Oho89a]
    A. Ohori. Semantics of types for database objects. Theoretical Computer Science, To appear. (Special issue devoted to 2nd International Conference on Database Theory, 1988), Available as a technical report form University of Pennsylvania, 1989.Google Scholar
  33. [Oho89b]
    A. Ohori. A simple semantics for ML polymorphism. In Proc. ACM/IFIP Conference on Functional Programming Languages and Computer Architecture, pages 281–292, London, England, September 1989.Google Scholar
  34. [Rey74]
    J.C. Reynolds. Towards a theory of type structure. In Paris Colloq. on Programming, pages 408–425. Springer-Verlag, 1974.Google Scholar
  35. [SSS88]
    D. Stemple, A. Socorro, and T. Sheard. Formalizing objects for databases using ADABTPL. In Proc. second International Workshop on Object-Oriented Databases, Lecture Notes in Computer Science, pages 110–128, 1988.Google Scholar
  36. [Sto77]
    J. Stoy. Denotational Semantics: The Scott-Strachey approach to Programming Language Theory. MIT Press, 1977.Google Scholar
  37. [Tof88]
    M. Tofte. Operational Semantics and Polymorphic Type Inference. PhD thesis, Department of Computer Science, University of Edinburgh, 1988.Google Scholar
  38. [Ull82]
    J.D. Ullman. Principle of Database Systems. Pittman, second edition, 1982.Google Scholar
  39. [Wad90]
    P. Wadler. Comprehending monads. In Proc. ACM Conference on Lisp and Functional Programming, 1990.Google Scholar
  40. [Zdo89]
    S. Zdonik. Can an object change type? can type objects change? In F. Bancilhon and P. Buneman, editors, Workshop on Database Programming Languages. Addison-Wesley, 1989.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1990

Authors and Affiliations

  • Atsushi Ohori
    • 1
  1. 1.Department of Computing ScienceUniversity of GlasgowGlasgowScotland, U.K.

Personalised recommendations