Domain-specific languages (DSLs) can improve software maintainability due to less verbose syntax, avoidance of boilerplate code, more accurate static analysis, and domain-specific tool support. However, most existing applications cannot capitalise on these benefits because they were not designed to use DSLs, and rewriting large existing applications from scratch is infeasible. We propose a process for evolving existing software to use embedded DSLs based on modular definitions and applications of syntactic sugar as provided by the extensible programming language SugarJ. Our process is incremental along two dimensions: A developer can add support for another DSL as library, and a developer can refactor more code to use the syntax, static analysis, and tooling of a DSL. Importantly, the application remains executable at all times and no complete rewrite is necessary. We evaluate our process by incrementally evolving the Java Pet Store and a deliberately small part of the Eclipse IDE to use language support for field-accessors, JPQL, XML, and XML Schema. To help maintainers to locate Java code that would benefit from using DSLs, we developed a tool that analyses the definition of a DSL to derive patterns of Java code that could be represented with a high-level abstraction of the DSL instead.
| Zugehörige Institution am KIT | Institut für Programmstrukturen und Datenorganisation (IPD) |
|---|---|
| Sprache | englisch |
| KITopen-ID | 1000188546 |
| Schlagwörter | Application programs, Computer programming languages, Natural language processing systems, Problem oriented languages, Syntactics, Tools, XML |
| Verlag | Springer |
| ISBN des Proceedingsbands | 978-3-319-02653-4 |
| Serie | Lecture Notes in Computer Science (LNCS) (8225) ISSN: 1611-3349 |
| Veranstaltung | 6th International Conference on Software Language Engineering, Indianapolis, IN, USA, 26. – 28.10.2013 |
| Nachgewiesen in | Scopus Dimensions OpenAlex |