Automated Recovery of Software Product Lines from Legacy Configurable Codebases
Preprocessor directives such as texttt{#ifdef} have historically been the predominant mechanism for managing variability in legacy C/C++ codebases. While they offer a simple way to include or exclude code at compilation time, they lack explicit variability representation and make it difficult to reason about features beyond conditional inclusion. Over time, these directives tend to become scattered, redundant, and obsolete—resulting in tangled and rigid implementations that hinder maintenance, reuse, and long-term evolution. With the growing maturity of Software Product Line Engineering (SPLE) and the emergence of industrial tools such as Mobioos Forge, it is now possible to rethink the variability management in legacy systems. Forge enables the specification of variability through feature models, the generation of feature-to-code mappings, and the static derivation of variants without relying on the compiler. These capabilities pave the way for modernizing configurable codebases by making variability explicit, analyzable, and maintainable. In this paper, we present an integrated toolchain for the automated recovery of Software Product Lines from legacy C/C++ systems. Our approach identifies features and their interactions, synthesizes a hierarchical feature model, and generates traceability links to locate feature-specific code fragments. Built as an extension to Mobioos Forge, our tool also leverages its static derivation engine to safely remove obsolete features and generate concrete product variants. We validate our approach on large-scale, real-world open-source systems, including Chromium, which contains over 2500 distinct features. The results demonstrate the effectiveness of our method in revealing hidden variability structures, enabling safe variant generation, and supporting the modernization of legacy configurable systems through SPLE principles.
Fri 12 SepDisplayed time zone: Auckland, Wellington change
13:30 - 15:00 | Session 15 - Reuse 2NIER Track / Industry Track / Research Papers Track at Case Room 3 260-055 Chair(s): Elliott Wen The University of Auckland | ||
13:30 15m | AST-Enhanced or AST-Overloaded? The Surprising Impact of Hybrid Graph Representations on Code Clone Detection Research Papers Track Zixian Zhang School of Computer Science, University of Galway, Takfarinas Saber School of Computer Science, University of Galway | ||
13:45 10m | Client–Library Compatibility Testing with API Interaction Snapshots NIER Track Gustave Monce Univ. Bordeaux, Bordeaux INP, CNRS, LaBRI, Thomas Degueule CNRS, Jean-Rémy Falleri Univ. Bordeaux, Bordeaux INP, CNRS, LaBRI. Institut Universitaire de France., Romain Robbes CNRS, LaBRI, University of Bordeaux Pre-print | ||
13:55 10m | Prompting Matters: Assessing the Effect of Prompting Techniques on LLM-Generated Class Code NIER Track Adam Yuen University of Calgary, John Pangas University of Calgary, Md Mainul Hasan Polash University of Calgary, Ahmad Abdellatif University of Calgary | ||
14:05 10m | From First Use to Final Commit: Studying the Evolution of Multi-CI Service Adoption NIER Track Pre-print | ||
14:15 15m | Automated Recovery of Software Product Lines from Legacy Configurable Codebases Industry Track Tewfik Ziadi University of Doha for Science and Technology (UDST), Karim Ghallab Sorbonne Université - RedFabriQ/Mobioos, Zaak Chalal RedFabriQ/Mobioos | ||
14:30 15m | Integrating Rules and Semantics for LLM-Based C-to-Rust Translation Industry Track Feng Luo Harbin Institute of Technology (Shenzhen), Kexing Ji Harbin Institute of Technology (Shenzhen), Cuiyun Gao Harbin Institute of Technology, Shenzhen, Shuzheng Gao Chinese University of Hong Kong, jiafeng Harbin Institute of Technology (Shenzhen), Kui Liu Huawei, Xin Xia Zhejiang University, Michael Lyu The Chinese University of Hong Kong | ||