ABSTRACT
A common trend in programming language specification is to generate various tools (e.g., compiler, editor, profiler, and debugger) from a grammar. In such a generative approach, it is desirable to have the definition of a programming language be modularized according to specific concerns specified in the grammar. However, it is often the case that the corresponding properties of the generated tools are scattered and tangled across the language specification. In this paper, separation of concerns within a programming language specification is demonstrated by considering debugging support within a domain-specific language (DSL). The paper first describes the use of AspectJ to weave the debugging semantics into the code created by a parser generator. The paper outlines several situations when the use of AspectJ is infeasible at separating language specification properties. To accommodate such situations, a second approach is presented that weaves the debugging support directly into a grammar specification using a program transformation engine. A case study for a simple DSL is presented to highlight the benefits of weaving across language specifications defined by grammars.
- The AspectJ web site (http://aspectj.org).]]Google Scholar
- ANTLR - ANother Tool for Language Recognition, available from http://www.antlr.org/.]]Google Scholar
- Ira Baxter, Christopher Pidgeon, and Michael Mehlich, "DMS: Program Transformation for Practical Scalable Software Evolution," International Conference on Software Engineering (ICSE), Edinburgh, Scotland, May 2004, pp. 625--634.]] Google ScholarDigital Library
- Jonathan B. Rosenberg, How Debuggers Work- Algorithms, Data Structures, and Architecture, John Wiley & Sons. Inc, New York, NY, 1996.]] Google ScholarDigital Library
- Uwe Aßmann, Invasive Software Composition, Springer-Verlag, 2003.]] Google ScholarDigital Library
- Paul Klint, Ralf Lammel, and Chris Verhoef, "Towards an Engineering Discipline for Grammarware," http://www.cs.vu.nl/grammarware/.]] Google ScholarDigital Library
- Marjan Mernik, Matej Crepinsek, Tomaz Kosar, Damijan Rebernak, and Viljem Zumer, "Grammar-Based Systems: Definition and Examples," Journal of Informatica, accepted for publication - 2004.]]Google Scholar
- Hui Wu, Jeff Gray, and Marjan Mernik, "Debugging Domain-Specific Languages in Eclipse," OOPSLA Eclipse Technology Exchange Poster Session, Vancouver, BC, October 2004.]] Google ScholarDigital Library
- Oege de Moor, Simon Peyton-Jones, and Eric Van Wyk, "Aspect-Oriented Compilers," Generative and Component-Based Software Engineering, Springer-Verlag LNCS 1799, September 1999, pp. 121--133.]] Google ScholarDigital Library
- Görel Hedin and Eva Magnusson, "JastAdd-an Aspect-Oriented Compiler Construction System," Science of Computer Programming, April 2003, pp. 37--58.]] Google ScholarDigital Library
- The JUnit web site (http://www.junit.org).]]Google Scholar
Index Terms
- Weaving a debugging aspect into domain-specific language grammars
Recommendations
Declaratively defining domain-specific language debuggers
GCPE '11Tool support is vital to the effectiveness of domain-specific languages. With language workbenches, domain-specific languages and their tool support can be generated from a combined, high-level specification. This paper shows how such a specification ...
A debug interface for debugging multiple domain specific aspect languages
AOSD '12: Proceedings of the 11th annual international conference on Aspect-oriented Software DevelopmentResearch in the area of multi-DSAL development has been mainly devoted to enabling the interoperability of multiple aspect mechanisms. Less attention has been given to making programming with multiple aspect languages practical. For domain specific ...
First-class domain specific aspect languages
MODULARITY Companion 2015: Companion Proceedings of the 14th International Conference on ModularityProgramming in a domain specific aspect language (DSAL) typically involves some language workbench for transforming the DSAL code and some AOP composition framework for weaving the transformed code. However, DSAL development remains second-class in two ...
Comments