skip to main content
article
Free Access

Transparent modules with fully syntatic signatures

Published:01 September 1999Publication History
Skip Abstract Section

Abstract

ML-style modules are valuable in the development and maintenance of large software systems, unfortunately, none of the existing languages support them in a fully satisfactory manner. The Official SML'97 Definition does not allow higher-order functors, so a module that refers to externally defined functors cannot accurately describe its import interface. MacQueen and Tofte [26] extended SML'97 with fully transparent higher-order functors, but their system does not have a type-theoretic semantics thus fails to support fully syntactic signatures. The systems of manifest types [19, 20] and translucent sums [12] support fully syntactic signatures but they may propagate fewer type equalities than fully transparent functors. This paper presents a module calculus that supports both fully transparent higher-order functors and fully syntactic signatures (and thus true separate compilation). We give a simple type-theoretic semantics to our calculus and show how to compile it into an Fω-like λ-calculus extended with existential types.

References

  1. 1 E. Biagioni, R. Harper, R Lee, and B. Milnes. Signatures for a network protocol stack: A systems application of Standard ML. In 1994 ACM Conference on Lisp and t~unctional Programming, pages 55-64, New York, June {994. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. 2 S.K. Biswas. Higher-order functors with transparent signatures. In Twenty-second Annual ACM Syrup. on Principles of Prog. Languages, pages 154-163, New York, Jan 1995. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 3 M. B/ume. A compilation manager for SML/NJ. as part of SML/NJ User's Guide, 1995.Google ScholarGoogle Scholar
  4. 4 L. Cardelli and X. Leroy. Abstract types and the dot notation. In Proc. Programming Concepts and Methods, pages 479~;04. North Holland, 1990.Google ScholarGoogle Scholar
  5. 5 L. Cardelli and D, MacQueen. Persistence and type abstraction. In M. P. Atkinson, P. Buneman, and R. Morrison, ~itors, Data Types and Persistence, pages 31-41. Springer-Verlag, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 6 S. Corrieo, B. Ewbank, T. Griffin, J. Meale, and H. Trickey. A tool for developing safe and efficient database transactions. In 15th In. ternational Switching Symposium of the World 7~lecommunications Congress, pages 173-177, April 1995.Google ScholarGoogle Scholar
  7. 7 J. Courant: An applicative module calculus. In M. Bidoit and M. Dauchet, editors, TAPSOFT'97: Theory and Practice of Software Development: LNCS Fo11214, pages 622-6~,6, New York, 1997. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. 8 K. Crary, R. Harper, and S. Puff. What is a recursive module? In Proc. SIGPLAN '99 Syrup. on Prog. Language Design and Implementation, page (to appear). ACM Press, May 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. 9 M. Flatt and M. Fe!leisen. Units: Cool modules for HOT languages. In Proc. ACM SIGPLAN '98 Conf. on Prog. Lang. Design and Implementation, pages 236-248. ACM Press, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. 10 L. George. MLRISC: Customizable and reusable code generators. Technical memorandum, Lucent Bell Laboratories, Murray Hill, N$, 1997.Google ScholarGoogle Scholar
  11. 11 J.Y. Girard. Interpretation Fonctionnelle et Elimination des Coupures clans l'Arithmetique d'Ordre Superieur. PhD thesis, University of Paris VII, 1972.Google ScholarGoogle Scholar
  12. 12 R. Harper and M. Lillibridge. A type-theoretic approach to higherorder modules with sharing. In Twenty-first Annual A CM Syrup. on Principles of Prog. Languages, pages 123-137, New York, Jan 1994. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. 13 R. Harper and J. C. Mitchell. On the type structure of Standard ML. ACM Tram. on Programming Languages and Systems, 15(2):211- 252, April 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. 14 R. Rarper, J. C. Mitchell, and E. Moggi. Higher-order modules and the phase distinction. In Sevemteenth Annual ACM Symp. on Principles of Prog. Languages, pages 341-344, New X~brk, Jan I990. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. 15 R. Harper and O. Morrisett. Compiling polymorphism using intensional type analysis. In Twenty-second Annual ACM Symp. on Principles' of Prog. Languages, pages 130--141, New York, Jan 1995. ACM Pregs. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. 16 R. Harper and C. Stone. An interpretation of Standard ML in type theory. Technical Report CMU--CS-97-147, School of Computer Science, Carnegie Mellon University, Pittsburgh, PA, June 1997.Google ScholarGoogle Scholar
  17. 17 M.P. Jones. Using parameterized signatures to express modular structure. in Twenty-third Annual ACM Syrup. on Pnnciples of Prog. Languages, pages 68-78, New York, Jan 1996. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. 18 X. Leroy. Unboxed objects and polymorphie typing. In Nineteenth Annual ACM Syrup. on Principles of Prog. Languages, pages 177- 188, New York, Jan 1992. ACM Press. Longer version available as INRIA Tech Report. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. 19 X. Leroy. Manifest types, modules, and separate compilation. In Twenty-first Annual ACM Syrup. on Principles of Prog. Languages, pages 109-122, New York, Jan 1994. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. 20 X. Lcroy. Applicative functors and fully transparent hishcr-order modules. In 7~venty-second Annual ACM $3~p. on Principles of Prog. Languages, pages 142-153, New York, Jan 1995. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. 21 X. Leroy. A syntactic ~eory of type generativity and sharing. Journal of Functional Programming, 6(5): 1-32, September 1996.Google ScholarGoogle ScholarCross RefCross Ref
  22. 22 S. Liang and G. Braeha. Dynamic e/ass loading in the Java virtual machine. In Proc. ACM $1GPLAN '98 Conf. on Object-Oriented Programming Systems, Languages, and applications, pages 36-44, New York, October 1998. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. 23 M. LiUibr/dge. Translucent Sums: A Foundation far Higher-Order Module Systems. PhD thesis, School of Computer Science, Carnegie Mellon University, Pittsburgh, PA, May 1997. T~ch Report CMU-CS- 97-122.Google ScholarGoogle Scholar
  24. 24 D. MaeQaeen. Modules for Standard ML. In 1984 ACM Conference on Lisp and J~unctional Programming, pages 198-207, New York, August 1984. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. 25 D. MacQueen. Using dependent types to express modular structure. In Proc. 13th Annual ACM SIGPLAN-SIGACT Symp. on Principles of Programming Languages, pages 277-286. ACM Press, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. 26 D. MacQucen and M. ToRe. A semantics for higher order functors. In The 5th European Symposium on Programming, pages 409--423, Berlin, April 1994. Spinger-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. 27 R. Milner, M. Torte, and R. Harper. The Definition of Standard ML. MIT Press, Cambridge, Massachusetts, i990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. 28 iL Milner, M. Tofie, IL Harper, and D. MacQueen. The Definition of Standard ML (Revised). MIT Press, Cambridge, Massachusetts, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. 29 Y. Minamide, O. Morrisett, and R. Harper. Typed closure conversion. In Proc. 23rd Annual ACM SIGPLAN-SIG,iCT Syrup. on Principles of Programming Languages, pages 271-283, New York, 1996. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. 30 G. Nelson, editor. Systems programming with Modulo-3. Prentice Hall, Englewood Cliffs, Nj, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. 31 J.H. Reppy and E. R. Gansner. The eXene library manual. SML/NJ documentations, March 1991.Google ScholarGoogle Scholar
  32. 32 J. C. Reynolds. Towards a theory of type structure. In Proceedings, Colloque sur la Programmation, Lecture Notes in Computer Science, volume 19, pages 408-425. Springer-Vedag, Berlin, 1974. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. 33 C.V. Russo. Types For Modules. PhD thesis, University of Edinburgh, Edinburgh, UK, June 1998.Google ScholarGoogle Scholar
  34. 34 Z. Shoo. Flexible representation analysis. In Proc. 1997 ACM SIGPLAN International Conference on Functional Programming (ICFP'97), pages 85-98, New York, June 1997. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. 35 Z. Shoo. Typed cross-module compilation. In Proc. 1998 ACM SIGPLAN International Conference on Functional Programming (ICFP'98), pages 141-152. ACM Press, September 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. 36 Z. Shoo. Transparent modules with fully syntactic signatures (extended version). Technical Report YALEU/DCS/RR-1181, Dept. of Computer Science, Yale Univ., New Haven, CT, June 1999.Google ScholarGoogle ScholarCross RefCross Ref
  37. 37 B. Stroustmp, editor. The C++ Programming Languages, Third Edition. Addison Wesley, Reading, MA, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. 38 M. ToRe. Principal signatures for high-order ML functors. In Nineteenth Annual ,4CM Syrup. on Principles of Prog. Languages, pages 189-199, New York, Jan 1992. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. 39 A. Tolmach. Tag-free garbage collection using explicit type parameters. In Proc. 1994/tCM Conf. on Lisp and Functional Programming, pages 1-11, New York, June 1994. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Transparent modules with fully syntatic signatures

      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

      Full Access

      • Published in

        cover image ACM SIGPLAN Notices
        ACM SIGPLAN Notices  Volume 34, Issue 9
        Sept. 1999
        283 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/317765
        Issue’s Table of Contents
        • cover image ACM Conferences
          ICFP '99: Proceedings of the fourth ACM SIGPLAN international conference on Functional programming
          September 1999
          288 pages
          ISBN:1581131119
          DOI:10.1145/317636
          • Chairmen:
          • Didier Rémy,
          • Peter Lee

        Copyright © 1999 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: 1 September 1999

        Check for updates

        Qualifiers

        • article

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader