DESIGN BY CONTRACT OF CYBER-PHYSICAL SYSTEMS DRIVEN BY SIMULATION AND BASED ON PROPERTIES MODELING Andrea Tundis, Max Mühlhäuser Telecooperation Lab, Department of Computer Science, Technische Universität Darmstadt Hochschulstrasse 10, 64289, Darmstadt, Germany tundis@tk.tu-darmstadt.de, max@tk.tu-darmstadt.de ABSTRACT Requirements elicitation and analysis is the basis for the successful development of a Cyber-Physical Systems (CPS). The misunderstanding of one or more requirements, due to different skills and knowledge between stakeholders and engineers, could com-promise the success of an entire project with harmful consequences. Usually, agreements on the system to be delivered and related expected results are based on textual requirements with a big lack of not being computationally verifiable and difficult to trace. To this purpose, the employment of innovative engineering tools for supporting the modeling and the verification of system requirements represent a viable solution. In this context, the pa-per proposes the exploitation of a Properties Modeling (PM) approach combined with Simulation techniques as Design-by-Contract method for CPS. In particular, PM is adopted for sup-porting the definition and the representation of system requirements and constrains as computable entities, whereas a Simulator is developed and exploited for enabling their automatic verification. Such combination is used as tool for defining requirements and conditions and verify their fulfillment before the sys-tem deployment. The results gathered from the simulation represent the contract on which the parties can agree for the realization of the actual system. The approach is exemplified in the Smart Grid domain. Keywords: Properties Modeling, Requirements Specification, Simulation-based Verification, Design- by-Contract, Cyber Physical Systems, Smart Grids 1. INTRODUCTION According to the International Council on Systems Engineering (INCOSE 2017), the causes that determine the success or the failure of a product, a service or an entire project, usually rely in the bad management of those factors related to its life cycle (INCOSE Book 2015). Since cyber-physical systems (CPS) (Danda, Rawat, and Rodrigues 2015) become more and more complex, the requirements to be fulfilled, both in terms of functionality and performance, are of primary interest. As a consequence, there is need to include them among the operational constraints from the beginning of the design stage. Especially, in application domains such as power plants, medical appliances, aerospace, and automotive, some non-functional requirements (such as reliability, availability, maintainability, safety and security) have to be guaranteed and comply to standard specifications and regulations (Lahtinen, Johansson, Ranta, Harju, and Nevalainen 2010; Rierson 2013; Furfaro, Garro, and Tundis 2014; Furfaro, Gallo, Garro, Sacca, and Tundis 2016). Indeed, the violation of some requirements can generate the failure of a project whose impact can be measured in terms of: (i) economic and temporal; (ii) motivational; (iii) individual and organizational stress; (iv) the destruction of value and corporate reputation, and even worse as (v) loss of human lives. Unfortunately, because of the high heterogeneity of CPS in terms of system components and functionalities to be provided, the management and the manual checking of the requirements is a challenging task to be performed. Thus, maintaining the compliance between the requirements and the actual system becomes increasingly difficult and unproductive to be performed. So, there is the need, from one hand, to clearly define constraints and requirements, and from the other hand to be able to verify them, possibly before the realization of the system or even before an advanced stage of its development is reached. This, in turn, implies to address some important challenges ranging from (Garro and Tundis 2015; Seshia, Hu, Li, and Zhu 2016; Falcone, Garro, and Tundis 2014) (i) identification of concepts and notations for modeling requirements; (ii) approaches for integrating design and requirements; (iii) automatic mechanisms that provide indications on the level of fulfillment of requirements during the system development. In this panorama, the use of engineering tools in terms of innovative methods and techniques represent a profitably solution. Particularly interesting is the Design by Contract (DbC) method, typical of software engineering (Ozkaya and Kloukinas 2013). According to the DbC, the involved entities in the design have obligations towards other entities on the basis of well- formalized rules. A functional specification, called contract is created for each software module before it is Proceedings of the Int. Conference on Modeling and Applied Simulation 2017, ISBN 978-88-97999-91-1; Bruzzone, De Felice, Frydman, Longo, Massei and Solis Eds. 90