Skip to main content

Software Evolution to Domain-Specific Languages

  • Conference paper
Book cover Software Language Engineering (SLE 2013)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 8225))

Included in the following conference series:

Abstract

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Bachrach, J., Playford, K.: The Java syntactic extender (JSE). In: OOPSLA, pp. 31–42. ACM (2001)

    Google Scholar 

  2. Batory, D., Johnson, C., MacDonald, B., von Heeder, D.: Achieving extensibility through product-lines and domain-specific languages: A case study. TOSEM 11(2), 191–214 (2002)

    Article  Google Scholar 

  3. Bennett, K.H., Rajlich, V.T.: Software maintenance and evolution: A roadmap. In: FOSE, pp. 73–87. ACM (2000)

    Google Scholar 

  4. Bianchi, A., Caivano, D., Marengo, V., Visaggio, G.: Iterative reengineering of legacy systems. Transactions on Software Engineering (TSE) 29(3), 225–241 (2003)

    Article  Google Scholar 

  5. Brabrand, C., Schwartzbach, M.I.: Growing languages with metamorphic syntax macros. In: PEPM, pp. 31–40. ACM (2002)

    Google Scholar 

  6. Dmitriev, S.: Language oriented programming: The next programming paradigm (2004)

    Google Scholar 

  7. Ekman, T., Hedin, G.: The JastAdd extensible Java compiler. In: OOPSLA, pp. 1–18. ACM (2007)

    Google Scholar 

  8. Erdweg, S.: Extensible Languages for Flexible and Principled Domain Abstraction. PhD thesis, Philipps-Universiät Marburg (2013)

    Google Scholar 

  9. Erdweg, S., Giarrusso, P.G., Rendel, T.: Language composition untangled. In: LDTA, pp. 7:1–7:8. ACM (2012)

    Google Scholar 

  10. Erdweg, S., Kats, L.C.L., Rendel, T., Kästner, C., Ostermann, K., Visser, E.: Growing a language environment with editor libraries. In: GPCE, pp. 167–176. ACM (2011)

    Google Scholar 

  11. Erdweg, S., Rendel, T., Kästner, C., Ostermann, K.: SugarJ: Library-based syntactic language extensibility. In: OOPSLA, pp. 391–406. ACM (2011)

    Google Scholar 

  12. Erdweg, S., et al.: The state of the art in language workbenches. In: Erwig, M., Paige, R.F., Van Wyk, E. (eds.) SLE 2013. LNCS, vol. 8225, pp. 197–217. Springer, Heidelberg (2013)

    Google Scholar 

  13. Flyvbjerg, B.: Five misunderstandings about case-study research. Qualitative Inquiry, 219–245 (2006)

    Google Scholar 

  14. Fowler, M.: Language workbenches: The killer-app for domain specific languages (2005), http://martinfowler.com/articles/languageWorkbench.html

  15. Germán, D.M., Davies, J.: Apples vs. oranges?: An exploration of the challenges of comparing the source code of two software systems. In: MSR, pp. 246–249. IEEE (2011)

    Google Scholar 

  16. Gil, J., Lenz, K.: Simple and safe SQL queries with C++ templates. Science of Computer Programming 75(7), 573–595 (2010)

    Article  MATH  Google Scholar 

  17. Hudak, P.: Modular domain specific languages and tools. In: Proceedings of International Conference on Software Reuse (ICSR), pp. 134–142. IEEE (1998)

    Google Scholar 

  18. Kats, L.C.L., Visser, E.: The Spoofax language workbench: Rules for declarative specification of languages and IDEs. In: OOPSLA, pp. 444–463. ACM (2010)

    Google Scholar 

  19. Nystrom, N., Clarkson, M.R., Myers, A.C.: Polyglot: An extensible compiler framework for java. In: Hedin, G. (ed.) CC 2003. LNCS, vol. 2622, pp. 138–152. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  20. Sneed, H.M.: Planning the reengineering of legacy systems. IEEE Software 12(1), 24–34 (1995)

    Article  Google Scholar 

  21. Steele Jr., G.L.: Growing a language. Higher-Order and Symbolic Computation 12(3), 221–236 (1999)

    Article  Google Scholar 

  22. Sun Microsystems. Java Pet Store (2002), http://www.oracle.com/technetwork/java/index-136650.html (accessed November 14, 2012)

  23. van Deursen, A., Klint, P.: Little languages: Little maintenance? Software Maintenance 10(2), 75–92 (1998)

    Article  Google Scholar 

  24. Van Wyk, E., Krishnan, L., Bodin, D., Schwerdfeger, A.: Attribute grammar-based language extensions for java. In: Ernst, E. (ed.) ECOOP 2007. LNCS, vol. 4609, pp. 575–599. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  25. Visser, E.: Syntax Definition for Language Prototyping. PhD thesis, University of Amsterdam (1997)

    Google Scholar 

  26. Visser, E.: Meta-programming with concrete object syntax. In: Batory, D., Blum, A., Taha, W. (eds.) GPCE 2002. LNCS, vol. 2487, pp. 299–315. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  27. Visser, E., Benaissa, Z.-E.-A.: A core language for rewriting. Electronic Notes in Theoretical Computer Science 15, 422–441 (1998)

    Article  Google Scholar 

  28. Visser, E., Benaissa, Z.-E.-A., Tolmach, A.P.: Building program optimizers with rewriting strategies. In: ICFP, pp. 13–26. ACM (1998)

    Google Scholar 

  29. Ward, M.P.: Language-oriented programming. Software – Concepts and Tools 15, 147–161 (1995)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer International Publishing Switzerland

About this paper

Cite this paper

Fehrenbach, S., Erdweg, S., Ostermann, K. (2013). Software Evolution to Domain-Specific Languages. In: Erwig, M., Paige, R.F., Van Wyk, E. (eds) Software Language Engineering. SLE 2013. Lecture Notes in Computer Science, vol 8225. Springer, Cham. https://doi.org/10.1007/978-3-319-02654-1_6

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-02654-1_6

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-02653-4

  • Online ISBN: 978-3-319-02654-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics