ACM Home Page
Please provide us with feedback. Feedback
Declarative, formal, and extensible syntax definition for aspectJ
Full text PdfPdf (654 KB)
Source Conference on Object Oriented Programming Systems Languages and Applications archive
Proceedings of the 21st annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications table of contents
Portland, Oregon, USA
SESSION: Compilation table of contents
Pages: 209 - 228  
Year of Publication: 2006
ISBN:1-59593-348-4
Also published in ...
Authors
Martin Bravenboer  Utrecht University, The Netherlands
Éric Tanter  University of Chile
Eelco Visser  Utrecht University, The Netherlands
Sponsors
SIGPLAN: ACM Special Interest Group on Programming Languages
ACM: Association for Computing Machinery
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 18,   Downloads (12 Months): 114,   Citation Count: 8
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/1167473.1167491
What is a DOI?

ABSTRACT

Aspect-Oriented Programming (AOP) is attracting attention from both research and industry, as illustrated by the ever-growing popularity of AspectJ, the de facto standard AOP extension of Java. From a compiler construction perspective AspectJ is interesting as it is a typical example of compositional language, ie a language composed of a number of separate languages with different syntactical styles: in addition to plain Java, AspectJ includes a language for defining pointcuts and one for defining advices. Language composition represents a non-trivial challenge for conventional parsing techniques. First, combining several languages with different lexical syntax leads to considerable complexity in the lexical states to processed. Second, as new language features for AOP are being explored, many research proposals are concerned with further extending the AspectJ language, resulting in a need for an extensible syntax definition.This paper shows how scannerless parsing elegantly addresses the issues encountered by conventional techniques when parsing AspectJ . We present the design of a modular, extensible, and formal definition of the lexical and context-free aspects of the AspectJ syntax in the Syntax Definition Formalism SDF, which is implemented by a scannerless, generalized-LR parser (SGLR). We introduce grammar mixins as a novel application of SDF's modularity features, which allows the declarative definition of different keyword policies and combination of extensions. We illustrate the modular extensibility of our definition with syntax extensions taken from current research on aspect languages. Finally, benchmarks show the reasonable performance of scannerless generalized-LR parsing for this grammar.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

 
1
AspectJ documentation. http://www.eclipse.org/aspectj/docs.php. With links to the AspectJ Programming Guide and the AspectJ 5Developer's Notebook.
 
2
Proc. of the 5th Intl. Conference on Aspect-Oriented Software Development (AOSD 2006), Bonn, Germany, Mar. 2006. ACM Press.
 
3
J. Aldrich. Open modules: Modular reasoning about advice. In Proc. of the European Conference on Object-Oriented Programming (ECOOP'05), volume 3586 of LNCS, pages 144--168. Springer-Verlag, July 2005.
4
5
 
6
P. Avgustinov, E. Hajiyev, N. Ongkingco, O. de Moor, D. Sereni, J. Tibble, and M. Verbaere. Semantics of static pointcuts in AspectJ. Technical Report abc-2006-3, Programming Tools Group, Oxford University, Oxford, United Kingdom, 2006.
 
7
 
8
 
9
A. Begel and S. L. Graham. Language analysis and tools for input stream ambiguities. In Fourth Workshop on Language Descriptions, Tools and Applications (LDTA'04), Electronic Notes in Theoretical Computer Science, Barcelona, Spain, April 2004. Elsevier.
 
10
 
11
E. Bodden and V. Stolz. J-LO, the Java Logical Observer. http://www-i2.informatik.rwth-aachen.de/Research/RV/JLO/.
12
 
13
G. Bracha, M. Odersky, D. Stoutamire, and P. Wadler. GJ specification, May 1998.
 
14
 
15
M. Bravenboer, R. Vermaas, J. J. Vinju, and E. Visser. Generalized type-based disambiguation of meta programs with concrete object syntax. In Glück and Lowry {18}, pages 157--172.
16
 
17
Eclipse Java Development Tools (JDT) website. http://www.eclipse.org/jdt/.
 
18
R. Glück and M. Lowry, editors. Proc. of the 4th ACM SIGPLAN/SIGSOFT Conference on Generative Programming and Component Engineering (GPCE 2005), volume 3676 of LNCS, Tallinn, Estonia, Sept./Oct. 2005. Springer-Verlag.
19
20
 
21
L. Hendren, O. de Moor, A. S. Christensen, and the abc team. The abc scanner and parser, including an LALR(1) grammar for AspectJ. Techrep, Programming Tools Group, Oxford University and the Sable research group, McGill University, September 2004.
 
22
G. Hutton. Higher-order functions for parsing. Journal of Functional Programming, (2(3)):323--343, July 1992.
23
 
24
 
25
M. M. Lehman. On understanding laws, evolution, and conservation in the large-program life cycle. Journal of Systems and Software, 1(3):213--231, 1980.
 
26
H. Masuhara and K. Kawauchi. Dataflow pointcut in aspect-oriented programming. In Proc. of the First Asian Symposium on Programming Languages and Systems (APLAS'03), volume 2895 of LNCS, pages 105--121. Springer-Verlag, Nov. 2003.
 
27
S. McPeak and G. C. Necula. Elkhound: A fast, practical GLR parser generator. In E. Duesterwald, editor, Proc. of 13th Intl. Conference on Compiler Construction (CC'04), volume 2985 of LNCS, pages 73--88, Berlin, April 2004. Springer-Verlag.
 
28
N. Nystrom, M. R. Clarkson, and A. C. Myers. Polyglot: An extensible compiler framework for Java. In Proc. of the 12th Intl. Conference on Compiler Construction, volume 2622 of LNCS, pages 138--152. Springer-Verlag, April 2003.
29
 
30
T. Parr. ANTLR Parser Generator. http://www.antlr.org.
 
31
J. Rekers. Parser Generation for Interactive Environments. PhD thesis, University of Amsterdam, 1992.
32
33
 
34
D. J. Salomon and G. V. Cormack. The disambiguation and scannerless parsing of complete character-level grammars for programming languages. Technical Report 95/06, Department of Computer Science, University of Manitoba, Winnipeg, Canada, 1995.
35
 
36
É. Tanter, K. Gybels, M. Denker, and A. Bergel. Context-aware aspects. In Proc. of the 5th Intl. Symposium on Software Composition (SC 2006), LNCS, pages 227--249, Vienna, Austria, Mar. 2006. Springer-Verlag.
 
37
É. Tanter and J. Noyé. A versatile kernel for multi-language AOP. In Glück and Lowry {18}, pages 173--188.
 
38
 
39
E. Visser. Scannerless generalized-LR parsing. Technical Report P9707, Programming Research Group, University of Amsterdam, July 1997.
 
40
E. Visser. Syntax Definition for Language Prototyping. PhD thesis, University of Amsterdam, September 1997.
 
41
D. Zook, S. S. Huang, and Y. Smaragdakis. Generating AspectJ programs with Meta-AspectJ. In G. Karsai and E. Visser, editors, Generative Programming and Component Engineering (GPCE'04), volume 3286 of LNCS, pages 1--19. Springer, October 2004.

CITED BY  8

Collaborative Colleagues:
Martin Bravenboer: colleagues
Éric Tanter: colleagues
Eelco Visser: colleagues