Language-Independent Safe Decomposition of Legacy Applications into Features
Christian Kästner, Sven Apel, Salvador Trujillo, Martin Kuhlemann, Don Batory Arbeitsgruppe Datenbanken · 2008
Software product lines (SPL) usually consist of code and non-code artifacts written in different languages. Often they are created by decomposing legacy applications into features. To handle different artifacts uniformly (code, documentation, models, etc.), current SPL technologies either use an approach that is so general that it works on character or token level, but can easily introduce subtle errors; or they provide specialized tools for a low number of languages. Syntax errors that only occur in certain variants are difficult to detect, as the exploding number of variants makes a manual testing unfeasible. In this paper, we present CIDE, an generic SPL tool that can ensure syntactic correctness for all variants. We show CIDE’s underlying mechanism that abstracts from textual representation and generalize it from Java to arbitrary languages. Furthermore, we automate the generation of safe plug-ins for additional languages from annotated grammars. To demonstrate CIDE’s capabilities, we applied it to a series of case studies with artifacts from different languages, including Java, C#, C, Haskell, ANTLR, and XML. 1