Language Evolution to Reduce Code Cloning
Domain-specific languages provide domain experts with the ability to create powerful applications regardless of their background. However, it usually takes a few iterations of the language design before it achieves such power. At the same time, many domains tend to evolve quite often today, which implies that domain-specific languages have to evolve accordingly. Thus, being able to evolve a language in a painless manner is crucial. Unfortunately, current state-of-the-art research does not provide enough answers on how to efficiently evolve domain-specific languages.
We present an approach to evolving a language in order to reduce the amount of code cloning it introduces. This approach is suitable for cases when applications written in a programming language contain many duplicated code segments.
We target domain-specific languages as they tend to be more challenging to evolve due to their specifics, but the approach can be applied to general purpose programming languages as well. The approach was tested on a real-world domain-specific language that is used in a financial domain. The language improvements that we proposed by following the approach were evaluated with the current users of the language. The resulting conclusion of the evaluation is that the improvements would reduce the code cloning, which provides evidence that this approach can be used in a real-world environment. Other than that, the ideas presented provide a solid basis for further research in the area of application of code cloning detection results to domain analysis.