## 1 Introduction  
In this era of Internet-of-Things (IoT) and the 4 th Industrial Revolution, intelligence is integrated into ordinary things. These smart devices are composed in complex systems, forming ambient intelligence and pervasive computing applications (e.g., [1; 2; 3]). Case studies include among other assisting living, smart transportation, and e-health. Thus, design technologies are becoming imperative in order to guarantee the desired requirements of a heterogeneous system-of-systems, like security, privacy, and dependability (SPD). During the lifecycle of a system, quantitating and measuring its features plays a significant part of the applied risk analysis. Industrial and scientific enterprises, such as the Ford Motor Company [4] and NASA [5], apply formal techniques to verify that the implemented systems and their counterparts guarantee the mission critical properties and achieve the intended design goals. Successful cyber-attacks in actual systems derive security in a core design property [6; 7]. Nowadays, privacy is also coming in the foreground [8; 9; 10], due to the processing of vast amounts of personal data, for example in IoT and cloud computing settings. Nevertheless, the simple deployment of security and privacy protection is not enough. Dependability of the underlying mechanisms has to be also taken into account [11; 12; 13]. However, it is still not easy to estimate in a practical and systematic manner, the overall security, privacy, and dependability aspects. With the adoption of ubiquitous and pervasive computing, computational resources are composed in a dynamic fashion, enabling the interaction between a high number of heterogeneous embedded and mobile devices. Therefore, the problem is becoming even more difficult to handle when we have to face such a dynamically composed ecosystem. In this paper, we implement CompoSecReasoner--a methodology for the description of the SPD aspects of composed systems, and the effects of changes in the state-architecture. CompoSecReasoner is appropriate for SPD verification, composition validation, comparison between different system configurations, impact assessment of changes in the system, and materialization of automated reactive strategies. Furthermore, the developed CompoSecReasoner framework is utilized as middleware of IoT applications, providing real-time monitoring and administration. CompoSecReasoner addresses four core elements in system development:  
1. **Extension with metrics of the system composition and management procedures. ** This enables the calculation of the SPD for the currently composed system. Metrics are evolving as an integral characteristic of systems' development as they are utilized for the comparison of the various possible system configurations, as well as, the impact quantification of the ongoing changes in the main setting. 2. **Verification that the various components can be composed into the examined system. ** This becomes imperative for heterogeneous environments (settings with different device types) and system-of-systems (a system comprised of many subsystems). 3. **Validation of properties that hold after the composition of two systems**. This capability is useful in order to assure that the finally composed system fulfills the designed specifications and works correctly. 4. **Automated reactive strategies and moving-target defenses (MTDs)**. The IoT ecosystem is dominant by machine-to-machine (M2M) communications. Therefore, we need means to make the overall system self-adaptable to changes, failures, and/or other ongoing events. MTD is also such an approach in the cyber-security field [14]. MTDs include proactive altering of the system configuration, networking, and/or topology to increase the malicious effort for analyzing the system in normal operation, as well as, reactive operations to respond to specific types of ongoing attacks.