Università degli Studi dell Aquila. Henry Muccini. Dipartimento di Informatica, Universityof L Aquila

Size: px
Start display at page:

Download "Università degli Studi dell Aquila. Henry Muccini. Dipartimento di Informatica, Universityof L Aquila"

Transcription

1 Università degli Studi dell Aquila Henry Muccini Dipartimento di Informatica, Universityof L Aquila henry.muccini@univaq.it

2 2 This presentation is partially built on the slides presentedat SERENE 2011 on Guaranteeing Correct Evolution of Software Product Lines, by Maurice H. ter Beek, Henry Muccini, and Patrizio Pelliccione

3 3 Research Question How can we guarantee the correct functioning of products of an SPL when core components evolve?

4 4 SPLE Software Product Line Engineering (SPLE) aims to develop software product lines using a common platform and mass customization SPL Software Product Lines (SPLs) are part of an SPLE approach to develop, in a cost effective way, software-intensive products and systems that share an overall reference model of a product family PLA The architectureof an SPL is typically referred to as a software Product Line Architecture (PLA) and it aims at defining the common architecture for the products that are related to a specific family

5 ProductLinesand ProductFamilies Product Line: This term was introduced by the US community Product Family: This term originated within a series of European industrial-cooperation projects

6 ProductLine Definition: A software product lineis a set of software intensive systems sharing a common, managed set of features that satisfy the specific needs of a particular market segment or mission and that are developed from a common set of core assetsin a prescribed way. [P. Clements -L. M. Northrop, 2001] (Software Engineering Institute, CMU)

7 Product Family Definition: A product family defines a similar concept, which is, a group of systems sharing a common, managed set of features that satisfy core needs of a scoped domain. [F. Van Der Linden and A. Van Der Klose, 2002] (CAFÉ and ESAPS European Projects)

8 The general idea The idea behind a system-family approach is to: build a new system or application from acommon set of assets A software assetmight be a component, known requirementsor design elements, models, artifactsthat an engineer uses to build or modify a software product in the same line (i.e., domain) pertaining to a general production line of a company

9 9

10 10

11 11 Nokia Mobile Phones produces a wide range of mobile phones. Currently 32 different phones are manufactured covering six different protocol standards, a wide variety of functional features and capabilities, different user interface designs, and many platforms and environments. The initial software architecture for this product line addressed variations in hardware, communication standards, and user interfaces [

12 12

13 13

14 14 Weneedtobuilda libraryof: Requirements, Architectures, Designs, and Implementations of the all family We need to be able to select the (product-specific): Requirements, Architecture, Design, and Implementation Buthow??

15 15

16 Product Line Architectures A product line architecture precisely captures, in a single specification, the overall architecture of a suite of closely- related products [Bosch2000] A PLA explicitly specifies: i) elements that are present in all products, ii) elements that are optional, and iii) elements which may be incorporated in one of many forms (variants) Whereas a regular architecture defines the structure of a single product, a product line architecture (PLA) defines the common architecture for a set of related products [Bosch2000]

17 An introductory example foo goop mandatory optional variant bar foobar variant In total, twenty-four different product architectures can be formed.

18 Keywords Variability: Variability is the ability to change or customize a software system [Jan Bosch, 2002] Variation point: A variation point refers to a delayed design decision, i.e., it A variation point refers to a delayed design decision, i.e., it indicates a specific point in the development or deployment phase of a software system The intention of designing a variation point into a system is to insert a variant (alternative) at a later phase in the lifecycle

19 SA vs PLA»a PLA captures the overall architecture of a suite of closely-related products [Bosch 00]» a PLA explicitly specifies mandatory, optional, and variant elements Mobile phone SA SA defines the structure and behavior of a single product Mobile phone PLA

20 20 Model problem (due to Paul Clements et al. at the SEI) I run the same software in different kinds of helicopters. When the software in a helicopter powers up, it checks a hardware register to see what kind of helicopter it is and starts behaving appropriately for that kind of helicopter. When I make a change to the software, I would like to flight test it only on one helicopter, and prove or (more likely) assert with high confidence that it will run correctly on the other helicopters. I know I can t achieve this for all changes,butiwouldliketodoitwherepossible. Model problem A model problem has been defined as a problem that, if solved, would result in a significant decrease in project resources devoted to testing and analysis and/or a significant increase in system quality given an expenditure level

21 + Fly test +?? + [Pictures taken from Google Images]

22 22 Assuming that various products (helicopters) have been derived from an SPL which have moreover been formally certified what can be concluded for new products obtained from the SPL by modifying one or more core components? Assumptions all products of the product line must be guaranteed to conform to a specific standard thereisa policy according to which any change to a core component requires all products containing that core component to be rebuilt

23 23 Is it necessary to re-validate all the products? Is it possible to re-validate only a products subset? While it is impossible to achieve this for all kind of changes, we would like to pinpoint the conditions under which this is feasible. Example Installing a new kind of radio across the fleet Flight-test it only on one helicopter Prove or more likely assert with high confidence, that it will run correctly on the other helicopters

24 24

25

26

27 27 When a component B evolves in a component B the assumption and guarantee pairs of B and B must be checked If B (a,g) exactly matches B(a,g), then B can safely substitute B If B (a,g) is less restrictive than B(a,g) it is possible to restrict the behavior of B to that of B by means of suitable wrappers, thus forcing B to behave as requested by the assumption of B If B is not able to behave as expected, according to B(a,g), then assume-guarantee reasoning might be used to understand the effect of the evolution

28 V&VChallenge The challenge is in investigating how the entire PLA can be used to automatically generate testing information which may be effectively reused to test each derivable product. modeling testing

29 PLA-based Testing (Strategy #1) 1) PLA-level testing: a. Weusethe PLA specification, as is, to identify PLA-based Test Cases (PlaTC) b. Whena PA isselected, PlaTCsare refinedtoproduce PA-based Test Cases - Use of combinatorial testing a. P L A b. P A

30 PLA-based Testing (Strategy #2) 2) Core-based testing: a. identify a particular product architecture, called minimal PA b. Core-level test cases may be extracted, using existing SA- based testing approaches c. Whena PA isselectedout of the PLA, Core-leveltest cases are enriched SA-Based Regression Testing Guided simulations b. a. P L A c. P A