An Aspect-Oriented Approach for Dealing with Non-Functional Requirements in a Model-Driven Development of Distributed Embedded Real-Time Systems Marco A. Wehrmeister 1 , Edison P. Freitas 1 , Carlos E. Pereira 1,2 , Flávio R. Wagner 1 1 Instituto de Informática, 2 Dep. Engenharia Elétrica – UFRGS – Brazil {mawehrmeister, epfreitas, flavio}@inf.ufrgs.br, cpereira@ece.ufrgs.br Abstract This work presents a proposal to use aspect orientation in the analysis and design of Distributed Embedded Real-time Systems (DERTS). These systems have several requirements directly related to their main characteristics, the so-called Non-Functional Requirements (NFR), which refer to orthogonal properties, conditions, and restrictions that are spread out over the entire system. Pure object-oriented methods do not address successfully those so called cross- cutting concerns, so new technologies, like aspect orientation, are applied in order to fulfill this gap. The paper presents DERAF - Distributed Embedded Real-time Aspects Framework, an extensible and high-level framework (i.e. implementation-independent) to handle NFR of DERTS at earlier design stages. DERAF combines the use of aspects with RT-UML, aiming to separate the handling of non-functional from functional requirements in the Model Driven Design of DERTS. The paper presents the use of DERAF on a case study of an unmanned air vehicle (UAV). 1. Introduction Embedded real-time systems have become very complex, requiring the distribution of functionalities into different processing units approximating services to the location where they are demanded (e.g. deploying sensing and control tasks of each helicopter rotating wing into small processors instead of grouping them into a more powerful processor), without violating system constraints. This feature characterizes the Distributed Embedded Real-Time Systems (DERTS). The increasing complexity of DERTS requires new development techniques in order to better support system evolution and maintainability, and the reuse of previously developed artifacts. DERTS have concerns that affect distinct parts of the system, the so-called crosscutting concerns. Non-Functional Requirements (NFR) must be carefully handled, in order to avoid tangled code and loss of cohesion. The separation of concerns, where crosscutting concerns are identified as NFR, is addressed by some works such as [1], [4] and [6]. Thus some guidelines are proposed in order to separate the handling of NFR from the functional ones: at implementation level, using concepts such as subject- oriented programming [2] and aspect-oriented programming [3]; and in the early phases of the design, such as in the Early-Aspects [4] approach. Real-time systems have a very important NFR which is the concern about timing aspects, such as deadlines, maximum jitter, worst case execution time, maximum tolerated delays, and others. The complexity related to the analysis of NFR increases when these systems become distributed and embedded. Some proposals suggest the use of aspects, as in [5] and [6]. Aspects can help to deal with crosscutting NFR into DERTS design by modularizing their handling. Additionally, more abstract aspects are easily reused because they define the handling of a concern at high-level and also how it can be applied (or how it affects) the system without implementation or platform constraints. This work presents the Distributed Embedded Real- time Aspects Framework (DERAF), which provides an extensible set of aspects to deal with NFR of DERTS at a high-level of abstraction, that is, a set of implementation- independent aspects 1 to handle NFR during the creation of RT-UML 2 models at design phase. In its initial version, DERAF handles the following NFR (see Section 2): timing, precision, performance, distribution, and embedded behavior. However, DERAF is an extensible framework, such that it can be extended to provide support to other important aspects (e.g. fault-tolerance). It is important to highlight that, in spite of the high-level of abstraction, aspects within DERAF must be implementable. On other words, the realization of each aspect must be possible, avoiding unfeasible aspects. The remaining of this paper is organized as follows. Section 2 discusses the handling of NFR within DERTS design, presenting an aspects framework to handle the identified NFR. Section 3 depicts how to design DERTS using the presented framework illustrated by a case study. Section 4 discusses related work, and final remarks and future work are presented in Section 5. 1 This idea of implementation-independent aspects to design DERTS was inspired by the context-free aspects as proposed in [9]. 2 The term “RT-UML” is used to identify UML [10] models annotated with the real-time profile [11]. Proceedings of the 10th IEEE International Symposium on Object and Component-Oriented Real-Time Distributed Computing (ISORC'07) 0-7695-2765-5/07 $20.00 © 2007