Software product lines provide systematic software reuse to implement whole product families efficiently. Therefore, they are increasingly used to handle the growing demand of custom-tailored software variants including safety-critical systems as a domain of application. The requirements for safety-critical systems are generally higher and often demand for behavioral correctness to reduce the risk of dangerous situations in-field. However, the high variability of software product lines is still a big challenge for formal methods in general. We argue that the stepwise development approach correctness-by-construction is beneficial compared to post-hoc verification approaches in dealing with the growing variability. Correctness-by-construction uses a set of refinement rules to incrementally create a correct program from a formal specification. In previous work, we already introduced variational correctness-by-construction to develop correct-by-construction software product lines in a product-based way. In this article, we extend our approach in three directions. First, we propose a feature-based specification technique matching the fine-grained specifications of correctness-by-construction. Second, we propose a family-based development approach to show the correctness of the product line as an alternative to the previous product-based approach. Third, we present our usability-improved tool VarCorC implementing our approach. In the evaluation, we compare the product-based development approach to the family-based approach using two case studies implemented with VarCorC.
Read full abstract