skip to main content
10.1145/581478.581485acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
Article

An interoperable calculus for external object access

Authors Info & Claims
Published:17 September 2002Publication History

ABSTRACT

By extending an ML-style type system with record polymorphism, recursive type definition, and an ordering relation induced by field inclusion, it is possible to achieve seamless and type safe interoperability with an object-oriented language. Based on this observation, we define a polymorphic language that can directly access external objects and methods, and develop a type inference algorithm. This calculus enjoys the features of both higher-order programming with ML polymorphism and class-based object-oriented programming with dynamic method dispatch. To establish type safety, we define a sample object-oriented language with multiple inheritance as the target for interoperability, define an operational semantics of the calculus, and show that the type system is sound with respect to the operational semantics. These results have been implemented in our prototype interpretable language, which can access Java class files and other external resources.

References

  1. M. Blume. No-longer-foreign: Teaching an ML compiler to speak C "natively". In N. Benton and A. Kennedy, editors, Electronic Notes in Theoretical Computer Science, volume~59. Elsevier Science Publishers, 2001.Google ScholarGoogle Scholar
  2. L. Cardelli. A semantics of multiple inheritance. In Semantics of Data Types, Lecture Notes in Computer Science 173. Springer-Verlag, 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. L. Cardelli and P. Wegner. On understanding types, data abstraction, and polymorphism. Computing Surveys, 17(4):471--522, Dec. 1985. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. M. Corporation and D. Corporation. The component object model specification, 1995.Google ScholarGoogle Scholar
  5. S. Finne, D. Leijen, E. Meijer, and S. L. P. Jones. Calling hell from heaven and heaven from hell. In International Conference on Functional Programming, pages 114--125, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. S. Finne, D. Leijen, E. Meijer, and S. P. Jones. H/Direct: A binary foreign language interface for Haskell. In Proceedings of the ACM SIGPLAN International Conference on Functional Programming (ICFP '98), volume 34(1) of ACM SIGPLAN Notices, pages 153--162. ACM, June 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. K. Fisher and J. H. Reppy. The design of a class mechanism for Moby. In SIGPLAN Conference on Programming Language Design and Implementation (PDLI), pages 37--49, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Y.-C. Fuh and P. Mishra. Type inference with subtypes. In Proceedings of ESOP '88, pages 94--114, 1988. Springer LNCS 300. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. C. Gunter and J. Mitchell, editors. Theoretical Aspects of Object-Oriented Programming. MIT Press, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. C. V. Hall, K. Hammond, S. L. Peyton Jones, and P. L. Wadler. Type classes in Haskell. ACM Transactions on Programming Languages and Systems, 18(2):109--138, Mar. 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. X. Leroy. Polymorphic typing of an algorithmic language. PhD thesis, University of Paris VII, 1992.Google ScholarGoogle Scholar
  12. X. Leroy. The Objective Caml system: Documentation and user's manual, 2000. (with Damien Doligez, Jacques Garrigue, Didier Rémy, and Jérôme Vouillon Available from http://caml.inria.fr.)Google ScholarGoogle Scholar
  13. T. Lindholm and F. Yellin. The Java virtual machine specification. Addison Wesley, second edition edition, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. E. Meijer and K. Claessen. The design and implementation of Mondrian. In Haskell Workshop. ACM, June 1997.Google ScholarGoogle Scholar
  15. E. Meijer and S. Finne. Lambada, Haskell as a better java. In G. Hutton, editor, Electronic Notes in Theoretical Computer Science, volume~41. Elsevier Science Publishers, 2001.Google ScholarGoogle Scholar
  16. J. Mitchell. Type inference and type containment. In Semantics of Data Types, Lecture Notes in Computer Science 173, pages 257--277. Springer-Verlag, 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. J. Nordlander. Pragmatic subtyping in polymorphic languages. In International Conference on Functional Programming (ICFP), 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. A. Ohori. A polymorphic record calculus and its compilation. ACM Transactions on Programming Languages and Systems, 17(6):844--895, 1995. A preliminary summary appeared at ACM POPL, 1992 under the title "A compilation method for ML-style polymorphic record calculi". Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. D. Remy. Typechecking records and variants in a natural extension of ML. In Proc. ACM Symposium on Principles of Programming Languages, pages 242--249, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. D. Rémy and J. Vouillon. Objective ML: An effective object-oriented extension to ML. Theory And Practice of Object Systems, 4(1):27--50, 1998. Summary in Proc. ACM POPL Symposium, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. R. Stansifer. Type inference with subtypes. In Proc. ACM Symposium on Principles of Programming Languages, pages 88--97, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. An interoperable calculus for external object access

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      ICFP '02: Proceedings of the seventh ACM SIGPLAN international conference on Functional programming
      October 2002
      294 pages
      ISBN:1581134878
      DOI:10.1145/581478
      • cover image ACM SIGPLAN Notices
        ACM SIGPLAN Notices  Volume 37, Issue 9
        September 2002
        283 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/583852
        Issue’s Table of Contents

      Copyright © 2002 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 17 September 2002

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • Article

      Acceptance Rates

      ICFP '02 Paper Acceptance Rate24of76submissions,32%Overall Acceptance Rate333of1,064submissions,31%

      Upcoming Conference

      ICFP '24
    • Article Metrics

      • Downloads (Last 12 months)3
      • Downloads (Last 6 weeks)0

      Other Metrics

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader