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.
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 3 M. B/ume. A compilation manager for SML/NJ. as part of SML/NJ User's Guide, 1995.Google Scholar
- 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 Scholar
- 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 ScholarDigital Library
- 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 Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 10 L. George. MLRISC: Customizable and reusable code generators. Technical memorandum, Lucent Bell Laboratories, Murray Hill, N$, 1997.Google Scholar
- 11 J.Y. Girard. Interpretation Fonctionnelle et Elimination des Coupures clans l'Arithmetique d'Ordre Superieur. PhD thesis, University of Paris VII, 1972.Google Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 21 X. Leroy. A syntactic ~eory of type generativity and sharing. Journal of Functional Programming, 6(5): 1-32, September 1996.Google ScholarCross Ref
- 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 ScholarDigital Library
- 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 Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 27 R. Milner, M. Torte, and R. Harper. The Definition of Standard ML. MIT Press, Cambridge, Massachusetts, i990. Google ScholarDigital Library
- 28 iL Milner, M. Tofie, IL Harper, and D. MacQueen. The Definition of Standard ML (Revised). MIT Press, Cambridge, Massachusetts, 1997. Google ScholarDigital Library
- 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 ScholarDigital Library
- 30 G. Nelson, editor. Systems programming with Modulo-3. Prentice Hall, Englewood Cliffs, Nj, 1991. Google ScholarDigital Library
- 31 J.H. Reppy and E. R. Gansner. The eXene library manual. SML/NJ documentations, March 1991.Google Scholar
- 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 ScholarDigital Library
- 33 C.V. Russo. Types For Modules. PhD thesis, University of Edinburgh, Edinburgh, UK, June 1998.Google Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarCross Ref
- 37 B. Stroustmp, editor. The C++ Programming Languages, Third Edition. Addison Wesley, Reading, MA, 1998. Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
Index Terms
- Transparent modules with fully syntatic signatures
Recommendations
Transparent modules with fully syntatic signatures
ICFP '99: Proceedings of the fourth ACM SIGPLAN international conference on Functional programmingML-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, ...
Applicative functors and fully transparent higher-order modules
POPL '95: Proceedings of the 22nd ACM SIGPLAN-SIGACT symposium on Principles of programming languageswe present a variety of the Standard ML module system where parameterized abstract types (i.e. functors returning generative types) map provably equal arguments to compatible abstract types, instead of generating distinct types at each applications as ...
Principal signatures for higher-order program modules
POPL '92: Proceedings of the 19th ACM SIGPLAN-SIGACT symposium on Principles of programming languagesUnder the Damas-Milner type discipline for functional languages, every expression has principal type, if it elaborates at all. In the type discipline for ML Modules, a signature expression has a principal signature, if it elaborates at all. However, ...
Comments