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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Wirth, N.: Programming in MODULA-2 (3rd corrected ed.). Springer, New York (1985)
Szyperski, C.: Component Software. Addison-Wesley, Reading (1998)
MacQueen, D.: Modules for standard ml. In: Proceedings of the 1984 ACM Symposium on LISP and Functional Programming, pp. 198–207 (1984)
Leroy, X.: Manifest types, modules, and separate compilation. In: ACM SIGPLANSIGACT Symposium on Principles of Programming Languages, pp. 109–122 (1994)
Kelsey, R., Rees, J., Sperber, M.: Scheme48 Reference Manual. 1.1 edn. (2005), http://s48.org/1.1/manual/s48manual.html
Flatt, M., Felleisen, M.: Units: Cool modules for HOT languages. In: ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 236–248 (1998)
Kelsey, R., Clinger, W., Rees, J. (eds.): Revised5 report of the algorithmic language Scheme. ACM SIGPLAN Notices 33, 26–76 (1998)
Dybvig, R.K., Hieb, R., Bruggeman, C.: Syntactic abstraction in Scheme. Lisp and Symbolic Computation 5, 295–326 (1993)
Queinnec, C.: Modules in scheme. In: Proceedings of the Third Workshop on Scheme and Functional Programming, pp. 89–95 (2002)
Serrano, M.: Bigloo: A “practical Scheme compiler”. 2.7a edn. (2005), http://wwwsop.inria.fr/mimosa/fp/Bigloo/doc/bigloo.html
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)
Flatt, M.: Composable and compilable macros: You want it when? In: ACM SIGPLAN International Conference on Functional Programming (2002)
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)
Clinger, W., Rees, J.: Macros that work. In: ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 155–162 (1991)
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)
Bawden, A.: First-class macros have types. In: Proc. symposium on Principles of programming languages, pp. 133–141. ACM Press, New York (2000)
Krishnamurthi, S.: Linguistic Reuse. PhD thesis, Rice University (2001)
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)
Taha, W., Johann, P.: Staged notational definitions. In: Pfenning, F., Smaragdakis, Y. (eds.) GPCE 2003. LNCS, vol. 2830, pp. 97–116. Springer, Heidelberg (2003)
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)
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)
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)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2005 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Culpepper, R., Owens, S., Flatt, M. (2005). Syntactic Abstraction in Component Interfaces. In: Glück, R., Lowry, M. (eds) Generative Programming and Component Engineering. GPCE 2005. Lecture Notes in Computer Science, vol 3676. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11561347_25
Download citation
DOI: https://doi.org/10.1007/11561347_25
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-29138-1
Online ISBN: 978-3-540-31977-1
eBook Packages: Computer ScienceComputer Science (R0)