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).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
D. Batory, G. Chen, E. Robertson, and T. Wang, “Web-Advertised Generators and Design Wizards”, International Conference on Software Reuse (ICSR), 1998.
D. Batory, B. Lofaso, and Y. Smaragdakis, “JTS: Tools for Implementing Domain-Specific Languages”, International Conference on Software Reuse (ICSR), 1998.
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.
A. Bawden and J. Rees, “Syntactic Closures”. In Proceedings of the SIGPLAN’ 88 ACM Conference on Lisp and Functional Programming, 86–95.
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.
W. Clinger, J. Rees (editors), “The Revised4 Report on the Algorithmic Language Scheme”. Lisp Pointers IV(3), July–September 1991, 1–55.
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.
R.K. Dybvig, R. Hieb, and C. Bruggeman, “Syntactic Abstraction in Scheme”, in Lisp and Symbolic Computation, 5(4), December 1993, 83–110.
C. Hanson, “A Syntactic Closures Macro Facility”, Lisp Pointers IV(4), October–December 1991, 9–16.
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.
J. Rees, “The Scheme of Things: Implementing Lexically Scoped Macros”, Lisp Pointers VI(1), January–March 1993.
T. Sheard and N. Nelson, “Type Safe Abstractions Using Program Generators”, Oregon Graduate Institute Tech. Report 95-013.
C. Simonyi, “The Death of Computer Languages, the Birth of Intentional Programming”, NATO Science Committee Conference, 1995.
Y. Smaragdakis and D. Batory, “DiSTiL: a Transformation Library for Data Structures”, USENIX Conference on Domain-Specific Languages (DSL), 1997.
W. Taha and T. Sheard, Multi-stage programming with explicit annotations, ACM Symp. Partial Evaluation and Semantics-Based Program Manipulation (PEPM’ 97), 1997.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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