Abstract
Meta programming can be facilitated by the ability to represent program fragments in concrete syntax instead of abstract syntax. The resulting meta programs are more self-documenting. One caveat in concrete meta programming is the syntactic separation between the meta language and the object language. To solve this problem, many meta programming systems use quoting and anti-quoting to indicate precisely where level switches occur. These “syntactic hedges” can obfuscate the concrete program fragments. This paper describes an algorithm for inferring quotes, such that the meta programmer no longer needs to explicitly indicate transitions between the meta and object languages.
Keywords
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.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
McCarthy, J., Abrahams, P.W., Edwards, D.J., Hart, T.P., Levin, M.I.: LISP 1.5 Programmer’s Manual. The MIT Press, Cambridge (1966)
Sellink, M., Verhoef, C.: Native patterns. In: Blaha, M., Quilici, A., Verhoef, C. (eds.) Proceedings of the Fifth Working Conference on Reverse Engineering, pp. 89–103. IEEE Computer Society Press, Los Alamitos (1998)
Heering, J., Hendriks, P., Klint, P., Rekers, J.: The syntax definition formalism SDF - reference manual. SIGPLAN Notices 24, 43–75 (1989)
Brand, M.v.d., Scheerder, J., Vinju, J., Visser, E.: Disambiguation Filters for Scannerless Generalized LR Parsers. In: Horspool, R.N. (ed.) CC 2002. LNCS, vol. 2304, pp. 143–158. Springer, Heidelberg (2002)
Bravenboer, M., Vermaas, R., Vinju, J., Visser, E.: Generalized type-based disambiguation of meta programs with concrete object syntax. In: Generative Programming and Component Engineering (GPCE) (to appear, 2005)
Leavenworth, B.M.: Syntax macros and extended translation. Commun. ACM 9, 790–793 (1966)
Aasa, A., Petersson, K., Synek, D.: Concrete syntax for data objects in functional languages. In: Proceedings of the 1988 ACM conference on LISP and functional programming, pp. 96–105. ACM Press, New York (1988)
Zook, D., Huang, S.S., Smaragdakis, Y.: Generating AspectJ programs with Meta-AspectJ. In: Karsai, G., Visser, E. (eds.) GPCE 2004. LNCS, vol. 3286, pp. 1–19. Springer, Heidelberg (2004)
Brand, M., Deursen, A., Heering, J., Jong, H., Jonge, M., Kuipers, T., Klint, P., Moonen, L., Olivier, P.A., Scheerder, J., Vinju, J., Visser, E., Visser, J.: The ASF+SDF Meta-Environment: a Component-Based Language Development Environment. In: Wilhelm, R. (ed.) CC 2001. LNCS, vol. 2027, pp. 365–370. Springer, Heidelberg (2001)
Visser, E.: Stratego: A language for program transformation based on rewriting strategies. System description of Stratego 0.5. In: Middeldorp, A. (ed.) RTA 2001. LNCS, vol. 2051, pp. 357–361. Springer, Heidelberg (2001)
Visser, E.: Meta-programming with concrete object syntax. In: Batory, D., Consel, C., Taha, W. (eds.) GPCE 2002. LNCS, vol. 2487, p. 299. Springer, Heidelberg (2002)
Cordy, J., Halpern-Hamu, C., Promislow, E.: TXL: A rapid prototyping system for programming language dialects. Computer Languages 16, 97–107 (1991)
Klint, P., Visser, E.: Using filters for the disambiguation of context-free grammars. In: Pighizzini, G., San Pietro, P. (eds.) Proc. ASMICS Workshop on Parsing Theory, Milano, Italy, Tech. Rep. 126–1994, Dipartimento di Scienze dell’Informazione, Università di Milano, pp. 1–20 (1994)
Brand, M., Klusener, S., Moonen, L., Vinju, J.: Generalized Parsing and Term Rewriting - Semantics Directed Disambiguation. In: Bryant, B., Saraiva, J. (eds.) Third Workshop on Language Descriptions Tools and Applications. Electronic Notes in Theoretical Computer Science, vol. 82. Elsevier, Amsterdam (2003)
Aho, A., Sethi, R., Ullman, J.: Compilers. Principles, Techniques and Tools. Addison-Wesley, Reading (1986)
Paakki, J.: Attribute grammar paradigms: a high-level methodology in language implementation. ACM Comput. Surv. 27, 196–255 (1995)
Milner, R.: A theory of type polymorphism in programming. Journal of Computer and System Sciences 17, 348–375 (1978)
Johnson, M.: The computational complexity of GLR parsing. In: Tomita, M. (ed.) Generalized LR Parsing, pp. 35–42. Kluwer, Boston (1991)
Billot, S., Lang, B.: The structure of shared forests in ambiguous parsing. In: Proceedings of the 27th annual meeting on Association for Computational Linguistics, Morristown, NJ, USA, pp. 143–151 (1989)
Brand, M., Jong, H., Klint, P., Olivier, P.: Efficient Annotated Terms. Software, Practice & Experience 30, 259–291 (2000)
Vinju, J.: A type driven approach to concrete meta programming. Technical Report SEN-E0507, CWI (2005)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2006 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Vinju, J.J. (2006). Type-Driven Automatic Quotation of Concrete Object Code in Meta Programs. In: Guelfi, N., Savidis, A. (eds) Rapid Integration of Software Engineering Techniques. RISE 2005. Lecture Notes in Computer Science, vol 3943. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11751113_8
Download citation
DOI: https://doi.org/10.1007/11751113_8
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-34063-8
Online ISBN: 978-3-540-34064-5
eBook Packages: Computer ScienceComputer Science (R0)