## 6 Evaluation
### Benefits of the Reconfiguration Process  
As we mentioned in previous sections, WSNs and AmI systems may obtain the benefits of building application families instead of building single applications. This is because these kinds of systems have many common parts and some differences, and the common parts will be reused, specifically the parts related to the handling of contexts. Once a SPL family has been defined and implemented, the instantiation of particular products is a fast and easy task. Nevertheless, the effort needed to define a family from scratch is considerable, so we propose the usage of FamiWare. One of the main advantages of using FamiWare to develop context-aware AmI application families is that they can use the implementation of many AmI typical services (as data delivery and security), as well as the FamiWare facilities for sensors and smartphones. One of these facilities is the provided structure to manage contexts in order to build self-adaptative systems, a strong requirement for WNSs in the Future Internet. Thus, these applications benefit greatly from using the FamiWare services for handling the contexts or adding new contexts to the family by means of our automatic configuration process.  
In our case study, for _Sensor01_, 18 components (taking into account the FamiWare microkernel, monitoring and context-aware services, as well as other services) are reused from a total of 24 components. These six new components correspond with the monitoring services to acquire the new contexts. But these components are no implemented from scratch, the only code that must be implemented are the one corresponding to the acquisition functions. Then, the monitoring services are automatically generated. Therefore, for our case study 86% of code lines are automatically generated and only 14% must be implemented by the application developer. In the best case, where all the context considered for a system has been already implemented by FamiWare, 100% of code will be generated automatically and the application developer only must to indicate the requirement about devices, network and application. In the worst case, where all the contexts needed by the AmI system has not been implemented by FamiWare, the application developer will benefit from the communication facilities and other services provided by FamiWare, as well as from the common structure of monitoring and context-awareness services which allows the automatic generation of code. Then, the effort of implementing a new context-aware application will be reduced considerably.  
One drawback of our defined mapping is that if the application developer models a context that exists in FamiWare but with a different name, so far our process cannot detect that they refer to the same context. In order to achieve this goal we plan to use OWL-S ontologies, which are well known in the knowledge representation community to model concepts and the relationships that hold between them. Specifically, we will define a formal representation of a set of concepts (such as user, profile, activity, location, time, _etc._) within a domain by capturing the relationships between those concepts and making the automatic selection of context services possible.