Integrating Domain-Specific Languages with General-Purpose Languages
Domain-specific languages (DSL) are small, usually declarative languages that focus
on a specific problem domain. SQL and regular expressions are two of the most
common DSL's. General-purpose languages (GPL) such as C, C++ and Java are
covering a wider application domain, but lack expressive power when applicable to
specific problems. Usually DSL's are implemented as external application libraries
when used by GPLs and the compiler is unaware of the DSL syntax and data types,
creating a series of problems in the software development process.
Our approach attempts to fill this scientific gap will introduce J% (j-mod), a DSL-aware
programming language. J% will be an extension of the Java programming language.
Its prototype implementation consists of a pre-processor, which translates the J%
source code to Java compatible code.
The J% approach tries to give a more pragmatic approach to DSL integration. All
research efforts so far, have one of the following weaknesses:
In J% we will avoid the aforementioned weaknesses. In addition, we will address the
theoretical aspects of the problem, like possible type system extension etc.
Our prototype implementation will have as target the Java programming language. As
a research result, we will provide a solid implementation and a more generalised
methodology that could guide the application of our techniques to other programming
languages like C and C++.