Experiences from reengineering and modularizing a legacy software generator with a projectional language workbench

We present a case study of migrating a legacy language infrastructure and its codebase to a projectional language workbench. Our subject is the generator tool ADS used for generating COBOL code for critical software systems. We decompose the ADS language into smaller sub-languages, which we implement as individual DSLs in the projectional language workbench JetBrains Meta Programming System (MPS). Our focus is on ADS' preprocessor sub-language, used to realize static variability by conditionally including or parameterizing target code. The modularization of ADS supports future extensions and tailoring the language infrastructure to the needs of individual customers. We re-implement the generation process of target code as chained model-to-model and model-to-text transformations. For migrating existing ADS code, we implement an importer relying on a parser in order to create a model in MPS. We validate the approach using an ADS codebase for handling car registrations in the Netherlands. Our case study shows the feasibility and benefits (e.g., language extensibility and modern editors) of the migration, but also smaller caveats (e.g., small syntax adaptations, the necessity of import tools, and providing training to developers). Our experiences are useful for practitioners attempting a similar migration of legacy generators to a projectional language workbench.

[1]  Markus Völter,et al.  Towards User-Friendly Projectional Editors , 2014, SLE.

[2]  Miguel A. Laguna,et al.  A systematic mapping study on software product line evolution: From legacy system reengineering to product line refactoring , 2013, Sci. Comput. Program..

[3]  Martin Fowler,et al.  Domain-Specific Languages , 2010, The Addison-Wesley signature series.

[4]  Jurriaan Hage,et al.  How do professionals perceive legacy systems and software modernization? , 2014, ICSE.

[5]  Franck Barbier,et al.  Model Driven Reverse Engineering: Increasing Legacy Technology Independence , 2011, ISEC 2011.

[6]  Eelco Visser,et al.  Evaluating and comparing language workbenches: Existing results and benchmarks for the future , 2015, Comput. Lang. Syst. Struct..

[7]  Arie van Deursen,et al.  Using C language extensions for developing embedded software: a case study , 2015, OOPSLA.

[8]  Benoît Combemale,et al.  Reverse-Engineering Reusable Language Modules from Legacy Domain-Specific Languages , 2016, ICSR.

[9]  Architecture-Driven Modernization Scenarios , .

[10]  Bernhard Schätz,et al.  mbeddr: instantiating a language workbench in the embedded software domain , 2013, Automated Software Engineering.

[11]  Eelco Visser,et al.  DSL Engineering - Designing, Implementing and Using Domain-Specific Languages , 2013 .

[12]  Markus Völter,et al.  Language modularity with the MPS language workbench , 2012, 2012 34th International Conference on Software Engineering (ICSE).

[13]  Koushik Sen,et al.  Symbolic execution for software testing: three decades later , 2013, CACM.

[14]  Sebastian Erdweg,et al.  Variability-aware parsing in the presence of lexical macros and conditional compilation , 2011, OOPSLA '11.

[15]  Jean-Marc Jézéquel,et al.  Model-driven engineering for software migration in a large industrial context , 2007, MODELS'07.

[16]  Sven Apel,et al.  Analyzing the discipline of preprocessor annotations in 30 million lines of C code , 2011, AOSD '11.

[17]  Markus Völter,et al.  Efficiency of projectional editing: a controlled experiment , 2016, SIGSOFT FSE.

[18]  Eelco Visser,et al.  The State of the Art in Language Workbenches - Conclusions from the Language Workbench Challenge , 2013, SLE.

[19]  Timo Kehrer,et al.  Extensible Debugger Framework for Extensible Languages , 2015, Ada-Europe.