[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
article

Recursive structures for standard ML

Published: 01 October 2001 Publication History

Abstract

Standard ML is a statically typed programming language that is suited for the construction of both small and large programs. "Programming in the small" is captured by Standard ML's Core language. "Programming in the large" is captured by Standard ML's Modules language that provides constructs for organizing related Core language definitions into self-contained modules with descriptive interfaces. While the Core is used to express details of algorithms and data structures, Modules is used to express the overall architecture of a software system. In Standard ML, modular programs must have a strictly hierarchical structure: the dependency between modules can never be cyclic. In particular, definitions of mutually recursive Core types and values, that arise frequently in practice, can never span module boundaries. This limitation compromises modular programming, forcing the programmer to merge conceptually (i.e. architecturally) distinct modules. We propose a practical and simple extension of the Modules language that caters for cyclic dependencies between both types and terms defined in separate modules. Our design leverages existing features of the language, supports separate compilation of mutually recursive modules and is easy to implement.

References

[1]
Ancona, D., and Zucca, E. 1999. A primitive calculus of mixin modules. In Proc. Principles and Practice of Declarative Programming, LNCS vol. 1702, pages 69-72, Berlin.]]
[2]
Crary, K., and Harper, R., and Puri, S. 1999. What is a recursive module? In Proc. ACM SIGPLAN'99 Conf. on Programming Language Design and Implementation, pages 50-63.]]
[3]
Dreyer, D., and Harper, R., and Crary, K. 2001. Toward a Practical Type Theory for Recursive Modules. TR CMU-CS-01-112, Computer Science, Carnegie-Mellon University, March.]]
[4]
Duggan, D., and Sourelis, C. 1996. Mixin modules, In Proc. ACM SIGPLAN International Conference on Functional Programming, pages 262-273, Philadelphia.]]
[5]
Duggan, D., and Sourelis, C. 1998. Parameterized modules, recursive modules, and mixin modules. In Proc. ACM SIGPLAN Workshop on ML, pages 87-96, Baltimore.]]
[6]
Elsman, M. 1999. Program Modules, Separate Compilation, and Intermodule Optimisation. PhD thesis. University of Copenhagen.]]
[7]
Flatt, M., and Felleisen, M. 1998. Units: cool modules for HOT languages. In Proc. ACM SIGPLAN'98 Cord. on Programming Language Design and Implementation, pages 236-248.]]
[8]
Harper, R., Lillibridge, M. 1994. A type-theoretic approach to higher-order modules with sharing. In 21st ACM Symp. Principles of Programming Languages.]]
[9]
Harper, R, and Mitchell, J. C., and Moggi, E. 1990. Higher-order modules and the phase distinction. In 17th AOvl Symp. Principles of Programming Languages]]
[10]
Leroy, X., 1994. Manifest types, modules, and separate compilation. In 21st ACM Symp. Principles of Programming Languages, pages 109- 122. ACM Press.]]
[11]
Leroy, X., 1995. Applicative functors and fully transparent higher-order modules. In 22nd ACM Syrnp. Principles of Programming Languages.ACM Press.]]
[12]
Milner, R., and Tofte, M., and Harper, R., and Mac Queen, D. 1997. The Definition of Standard ML (Revised). MIT Press.]]
[13]
Okasaki, C. 1998. Purely Functional Data Structures. Cambridge University Press.]]
[14]
Russo, C. V. 1998. Types For Modules. PhD Thesis, LFCS. University of Edinburgh.]]
[15]
Russo, C. V. 1999. Non-Dependent Types For Standard ML Modules. In 1999 Int'l Conf. on Principles and Practice of Declarative Programming.]]
[16]
Russo, C. V. 2000. First-Class Structures for Standard ML. In Nordic Journal of Computing, 7(4):348, Winter 2000.]]
[17]
Sestoft, P., and Romanenko, S., and Russo, C. V. 2000. Moscow ML V2.00.]]
[18]
Tofte, M. 1988. Operational Semantics and Polymorphic Type Inference. PhD thesis, Computer Science, University of Edinburgh.]]
[19]
Wells, M., and Vestergaard, R. 2000. Equational reasoning for linking with first-class primitive modules. In Programming Languages & Systems, 9th European Symp. Programming, LNCS vol. 1782, pages 412-428, Berlin.]]

Cited By

View all

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM SIGPLAN Notices
ACM SIGPLAN Notices  Volume 36, Issue 10
October 2001
276 pages
ISSN:0362-1340
EISSN:1558-1160
DOI:10.1145/507669
Issue’s Table of Contents
  • cover image ACM Conferences
    ICFP '01: Proceedings of the sixth ACM SIGPLAN international conference on Functional programming
    October 2001
    277 pages
    ISBN:1581134150
    DOI:10.1145/507635
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: 01 October 2001
Published in SIGPLAN Volume 36, Issue 10

Check for updates

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)1
  • Downloads (Last 6 weeks)0
Reflects downloads up to 12 Dec 2024

Other Metrics

Citations

Cited By

View all
  • (2020)The history of Standard MLProceedings of the ACM on Programming Languages10.1145/33863364:HOPL(1-100)Online publication date: 12-Jun-2020
  • (2012)Call-by-Value Semantics for Mutually Recursive First-Class ModulesProceedings of the 2012 Conference on Trends in Functional Programming - Volume 782910.1007/978-3-642-40447-4_7(101-116)Online publication date: 12-Jun-2012
  • (2006)ML Module ManiaElectronic Notes in Theoretical Computer Science (ENTCS)10.1016/j.entcs.2005.11.045148:2(181-209)Online publication date: 1-Mar-2006
  • (2005)An expressive language of signaturesACM SIGPLAN Notices10.1145/1090189.108637140:9(27-40)Online publication date: 12-Sep-2005
  • (2005)An expressive language of signaturesProceedings of the tenth ACM SIGPLAN international conference on Functional programming10.1145/1086365.1086371(27-40)Online publication date: 28-Sep-2005
  • (2024)Full Iso-Recursive TypesProceedings of the ACM on Programming Languages10.1145/36897188:OOPSLA2(192-221)Online publication date: 8-Oct-2024
  • (2021)Compositional ProgrammingACM Transactions on Programming Languages and Systems10.1145/346022843:3(1-61)Online publication date: 3-Sep-2021
  • (2019)Adventures in monitorability: from branching to linear time and back againProceedings of the ACM on Programming Languages10.1145/32903653:POPL(1-29)Online publication date: 2-Jan-2019
  • (2019)Bounded model checking of signal temporal logic properties using syntactic separationProceedings of the ACM on Programming Languages10.1145/32903643:POPL(1-30)Online publication date: 2-Jan-2019
  • (2019)Modular quantitative monitoringProceedings of the ACM on Programming Languages10.1145/32903633:POPL(1-31)Online publication date: 2-Jan-2019
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media