We address the problem of refactoring existing, closely related prod ucts into product line representations. Our approach is based on comparing and matching artifacts of these existing products and merging those deemed simi lar while explicating those that vary. Our work focuses on formal specification of a product line refactoring operator called merge-in that puts individual prod ucts together into product lines. We state sufficient conditions of model compare, match and merge operators that allow application of merge-in. Based on these, we formally prove correctness of the merge-in operator. We also demonstrate its operation on a small but realistic example.
展开▼