Skip to main content

Scoping Constructs for Software Generators

  • Conference paper
  • First Online:
Generative and Component-Based Software Engineering (GCSE 1999)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1799))

Abstract

A well-known problem in program generation is scoping. When identifiers (i.e., symbolic names) are used to refer to variables, types, or functions, program generators must ensure that generated identifiers are bound to their intended declarations. This is the standard scoping issue in programming languages, only automatically generated programs can quickly become too complex and maintaining bindings manually is hard. In this paper we present generation scoping: a language mechanism to facilitate the handling of scoping concerns. Generation scoping offers control over identifier scoping beyond the scoping mechanism of the target programming language (i.e., the language in which the generator output is expressed). Generation scoping was originally implemented as an extension of the code template operators in the Intentional Programming platform, under development by Microsoft Research. Subsequently, generation scoping has also been integrated in the JTS language extensibility tools. The capabilities of generation scoping were invaluable in the implementation of two actual software generators: DiSTiL (implemented using the Intentional Programming system), and P3 (implemented using JTS).

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. D. Batory, G. Chen, E. Robertson, and T. Wang, “Web-Advertised Generators and Design Wizards”, International Conference on Software Reuse (ICSR), 1998.

    Google Scholar 

  2. D. Batory, B. Lofaso, and Y. Smaragdakis, “JTS: Tools for Implementing Domain-Specific Languages”, International Conference on Software Reuse (ICSR), 1998.

    Google Scholar 

  3. D. Batory and S. O’Malley, “The Design and Implementation of Hierarchical Software Systems with Reusable Components”, ACM Transactions on Software Engineering and Methodology, October 1992.

    Google Scholar 

  4. A. Bawden and J. Rees, “Syntactic Closures”. In Proceedings of the SIGPLAN’ 88 ACM Conference on Lisp and Functional Programming, 86–95.

    Google Scholar 

  5. S. P. Carl, “Syntactic Exposures—A Lexically-Scoped Macro Facility for Extensible Languages”. M.A. Thesis, University of Texas, 1996. Available through the Internet at ftp://ftp.cs.utexas.edu/pub/garbage/carl-msthesis.ps.

  6. W. Clinger, J. Rees (editors), “The Revised4 Report on the Algorithmic Language Scheme”. Lisp Pointers IV(3), July–September 1991, 1–55.

    Google Scholar 

  7. W. Clinger and J. Rees, “Macros that Work”. in Conference Record of the Eighteenth Annual ACM Symposium on Principles of Programming Languages, January 1991, 155–162.

    Google Scholar 

  8. R.K. Dybvig, R. Hieb, and C. Bruggeman, “Syntactic Abstraction in Scheme”, in Lisp and Symbolic Computation, 5(4), December 1993, 83–110.

    Article  Google Scholar 

  9. C. Hanson, “A Syntactic Closures Macro Facility”, Lisp Pointers IV(4), October–December 1991, 9–16.

    Article  MathSciNet  Google Scholar 

  10. E. Kohlbecker, D.P. Friedman, M. Felleisen, and B. Duba, “Hygienic Macro Expansion”, in Proceedings of the SIGPLAN’ 86 ACM Conference on Lisp and Functional Programming, 151–161.

    Google Scholar 

  11. J. Rees, “The Scheme of Things: Implementing Lexically Scoped Macros”, Lisp Pointers VI(1), January–March 1993.

    Google Scholar 

  12. T. Sheard and N. Nelson, “Type Safe Abstractions Using Program Generators”, Oregon Graduate Institute Tech. Report 95-013.

    Google Scholar 

  13. C. Simonyi, “The Death of Computer Languages, the Birth of Intentional Programming”, NATO Science Committee Conference, 1995.

    Google Scholar 

  14. Y. Smaragdakis and D. Batory, “DiSTiL: a Transformation Library for Data Structures”, USENIX Conference on Domain-Specific Languages (DSL), 1997.

    Google Scholar 

  15. W. Taha and T. Sheard, Multi-stage programming with explicit annotations, ACM Symp. Partial Evaluation and Semantics-Based Program Manipulation (PEPM’ 97), 1997.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2000 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Smaragdakis, Y., Batory, D. (2000). Scoping Constructs for Software Generators. In: Czarnecki, K., Eisenecker, U.W. (eds) Generative and Component-Based Software Engineering. GCSE 1999. Lecture Notes in Computer Science, vol 1799. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-40048-6_6

Download citation

  • DOI: https://doi.org/10.1007/3-540-40048-6_6

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-41172-7

  • Online ISBN: 978-3-540-40048-6

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics