Advertisement

Syntactic Abstraction in Component Interfaces

  • Ryan Culpepper
  • Scott Owens
  • Matthew Flatt
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3676)

Abstract

In this paper, we show how to combine a component system and a macro system. A component system separates the definition of a program fragment from the statements that link it, enabling independent compilation of the fragment. A macro system, in contrast, relies on explicit links among fragments that import macros, since macro expansion must happen at compile time. Our combination places macro definitions inside component signatures, thereby permitting macro expansion at compile time, while still allowing independent compilation and linking for the run-time part of components.

Keywords

Functional Programming Component Interface Unit Body Client Code Database Component 
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.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Wirth, N.: Programming in MODULA-2 (3rd corrected ed.). Springer, New York (1985)Google Scholar
  2. 2.
    Szyperski, C.: Component Software. Addison-Wesley, Reading (1998)Google Scholar
  3. 3.
    MacQueen, D.: Modules for standard ml. In: Proceedings of the 1984 ACM Symposium on LISP and Functional Programming, pp. 198–207 (1984)Google Scholar
  4. 4.
    Leroy, X.: Manifest types, modules, and separate compilation. In: ACM SIGPLANSIGACT Symposium on Principles of Programming Languages, pp. 109–122 (1994)Google Scholar
  5. 5.
    Kelsey, R., Rees, J., Sperber, M.: Scheme48 Reference Manual. 1.1 edn. (2005), http://s48.org/1.1/manual/s48manual.html
  6. 6.
    Flatt, M., Felleisen, M.: Units: Cool modules for HOT languages. In: ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 236–248 (1998)Google Scholar
  7. 7.
    Kelsey, R., Clinger, W., Rees, J. (eds.): Revised5 report of the algorithmic language Scheme. ACM SIGPLAN Notices 33, 26–76 (1998)Google Scholar
  8. 8.
    Dybvig, R.K., Hieb, R., Bruggeman, C.: Syntactic abstraction in Scheme. Lisp and Symbolic Computation 5, 295–326 (1993)CrossRefGoogle Scholar
  9. 9.
    Queinnec, C.: Modules in scheme. In: Proceedings of the Third Workshop on Scheme and Functional Programming, pp. 89–95 (2002)Google Scholar
  10. 10.
    Serrano, M.: Bigloo: A “practical Scheme compiler”. 2.7a edn. (2005), http://wwwsop.inria.fr/mimosa/fp/Bigloo/doc/bigloo.html
  11. 11.
    Waddell, O., Dybvig, R.K.: Extending the scope of syntactic abstraction. In: Conference Record of POPL 1999: The 26th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, San Antonio, Texas, New York, pp. 203–213 (1999) Google Scholar
  12. 12.
    Flatt, M.: Composable and compilable macros: You want it when? In: ACM SIGPLAN International Conference on Functional Programming (2002)Google Scholar
  13. 13.
    Kohlbecker, E.E., Friedman, D.P., Felleisen, M., Duba, B.F.: Hygienic macro expansion. In: ACM Symposium on Lisp and Functional Programming, pp. 151–161 (1986)Google Scholar
  14. 14.
    Clinger, W., Rees, J.: Macros that work. In: ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 155–162 (1991)Google Scholar
  15. 15.
    Findler, R.B., Clements, J., Flanagan, C., Flatt, M., Krishnamurthi, S., Steckler, P., Felleisen, M.: DrScheme: A programming environment for Scheme. Journal of Functional Programming 12, 159–182 (2002); A preliminary version of this paper appeared in PLILP 1997, LNCS, vol. 1292, pp. 369–388. Springer, Heidelberg (1997)zbMATHCrossRefGoogle Scholar
  16. 16.
    Bawden, A.: First-class macros have types. In: Proc. symposium on Principles of programming languages, pp. 133–141. ACM Press, New York (2000)Google Scholar
  17. 17.
    Krishnamurthi, S.: Linguistic Reuse. PhD thesis, Rice University (2001)Google Scholar
  18. 18.
    Ganz, S.E., Sabry, A., Taha, W.: Macros as multi-stage computations: Type-safe, generative, binding macros in macroml. In: International Conference on Functional Programming, pp. 74–85 (2001)Google Scholar
  19. 19.
    Taha, W., Johann, P.: Staged notational definitions. In: Pfenning, F., Smaragdakis, Y. (eds.) GPCE 2003. LNCS, vol. 2830, pp. 97–116. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  20. 20.
    Harper, R., Lillibridge, M.: A type-theoretic approach to higher-order modules with sharing. In: ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 123–137 (1994)Google Scholar
  21. 21.
    Harper, R., Pierce, B.C.: Design issues in advanced module systems. In: Pierce, B.C. (ed.) Advanced Topics in Types and Programming Languages. MIT Press, Cambridge (2004) (to appear)Google Scholar
  22. 22.
    McDirmid, S., Flatt, M., Hsieh, W.C.: Jiazzi: New-age components for oldfashioned Java. In: Proc. conference on Object oriented programming, systems, languages, and applications, pp. 211–222. ACM Press, New York (2001)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • Ryan Culpepper
    • 1
  • Scott Owens
    • 2
  • Matthew Flatt
    • 2
  1. 1.Northeastern University 
  2. 2.University of Utah 

Personalised recommendations