• Nem Talált Eredményt

4.5 Managing Energy Efficiency-related Properties

4.5.2 Discussion

The first of the aspects to be considered is where to place the logic that chooses and configures the patterns to apply. One option is to integrate it into the client side library, which monitoring the current device environment could then operate adaptively. The other option is that the pattern-related decisions are made during the code generation phase by the model processor. As usual, there are pros and cons for both approaches. Having the logic in the client side library is beneficial because it can be configured adaptively. On the other hand, the developer may provide a hint for the library and in this way, the result can be a clearer and more understandable source code.

The next questions are the followings: Why is it important to increase the abstraction level in mobile application development? What are the benefits of modeling mobile applications? Why is it important to include the modeling of energy efficient issues of mobile applications as well? To raise the level of abstraction in model-driven development, both the modeling language and the model processor (generator) need to be domain-specific. The approach can improve both the performance of the development and the quality of the final products. The commonly identified benefits of the model-driven approach are improved productivity, better product quality, hidden complexity, and reuse of expertise.

Moving certain parts of mobile application definition to the modeling level, including the energy efficient settings, means that these aspects of the applications are also available on higher level. This makes it possible to gain an overview of the applications, to analyze them from different points of view, to verify or validate certain critical issues, and to generate the source code of the application from models.

We believe that it is necessary to involve the software developers in making applications more energy efficient at least to a certain extent. Solutions that delay traffic and are completely transparent to the developer, like the one described in [Qualcomm, 2012] may not be optimal either because they might lead to unexpected behavior from the developer’s viewpoint. From the perspective of a typical developer, the model-driven approach may sound unnecessarily cumbersome.

However, from the perspective of the product owner, the project manager, the software architect, and the customer it is worthwhile to move all possible aspects of mobile applications to a higher level of abstraction because that is the level at which they typically operate. They cannot think on the level of the libraries (source code), because they are responsible for a whole system with different parts: server side, desktop client, web clients, mobile clients, cloud-related things and so on. Still, they want to see the important aspects of each area. Modeling should concentrate on all key aspects of the mobile applications, including energy efficiency.

Energy efficiency is typically context dependent. This applies especially for data communication where the amount of Joules per bit spent depends on at least SNR (transmit power) and available bandwidth that vary with location and time. Therefore, regardless of whether model-driven or purely library-based approach is used, some logic should be executed at run time. For example, the energy utility of data transfer (J/bit) depends on e.g. SNR and available bandwidth that are location and time dependent which in turn impact the decision whether compressing specific type of content yields energy savings or not [Xiao et al, 2010].

Our examples focus only on communication energy. Other sources of energy drain, such as CPU, display, sensors, can be included to consideration as well. For example, the developer could decide to execute a function that renders the display in the most energy efficient manner by adapting the colors

[Dong and Zhong, 2011]. As for sensors, the programmer could explicitly set the trade-off between accuracy and energy consumption.

In summary, we can say that applying model-driven solutions in mobile application development is the current trend, and in the case of energy efficiency, it is also advised to follow it. Obviously, there are scenarios where modeling (higher abstraction level) does not provide immediate advantages. Our work in this area was the starting point of a discussion within the research community concerning how to effectively transfer the existing and novel energy efficiency techniques to the mobile application development.

4.6 Conclusions

Model transformation approaches are becoming increasingly valuable in software development processes because of the ability to capture and apply domain knowledge on the appropriate abstraction level and often in a declarative manner. This enables various steps in the software development to be specified separate from one another with apparent advantages such as reuse. In system design, the computational functionality moves through a series of design stages where different software representations are used. For example, before generating the code that is to run on the final device or platform, code may be generated that includes additional monitoring functionality.

As a design is being refined, models generally pass through a series of stages where details are increasingly added as a form of model elaboration. Model elaboration can, at least in part, be automated by sophisticated software tools.

A method has been worked out that supports the quality assurance of software development projects.

The method applies domain-specific languages to support the compilation and analyzes of business requirements against the software.

We have developed a method that allows the definition and management of domain-specific models.

The method provides suggestions regarding to the considerations and decisions we have to make during the analysis of the business needs and the definition of domain-specific languages, supports the steps and tasks related to the introduction of domain-specific languages and finally, helps during the maintenance of domain-specific languages. Furthermore, a method has been worked out that allows the effective and transparent switch between the visual and textual representations of semantic models.

We have successfully worked out and applied a novel solution that raises the abstraction level of processing Simulink models. This approach utilizes model-transformations defined in VMTS. Using model transformation to reduce the risk of creating artificial algebraic loops, replace built-in solutions with custom algorithms, and change data types helps raising the abstraction level from API programming to software modeling. The solution possesses all the advantageous characteristics of the model transformation, for example, it is reusable, transparent, and platform independent.

The transformations were implemented in the Visual Modeling and Transformation System (VMTS).

In order to transform Simulink models directly, the VMTS modeling framework communicates with the Simulink environment and the technology for doing so was briefly introduced.

Finally, we have provided a method for defining and managing energy efficient operation properties of mobile devices. The method allows defining the energy efficiency properties on the level of software models. As a result of the solution, this aspect of software systems appears on the modeling level, which provides a more detailed view about the whole system.

The discussed area related selected scientific results from my research activities are summarized in Section 7.2 (Thesis II: Model-Driven Methods Based on Domain-Specific Languages and Model Processors).

I believe that my results, domain-specific languages and model processors driven methods, contribute to the quality improvement of the software artifacts and increase the development productivity. Both the discussed methods and the introduced domain-specific languages are tool independent, therefore, these results can be utilized in various tools and for different circumstances.

5 Applying Specific Design Patterns and Validating Domain-Specific Properties

5.1 Introduction

In the field of graphical languages, we use metamodeling as a widely applied technique to define both modeling languages and highly configurable environments. These languages and environments support the rapid development of domain-specific languages and model processors. Design patterns are efficient solutions for recurring problems [Gamma et al, 1995]. With the popularity of domain-specific languages and domain-specific model processors, there is a need for domain-specific design patterns to offer solutions to problems reoccurring in different domains. This chapter introduces both theoretical results and practical methods to support domain-specific model patterns, validating domain-specific properties of software models and handling the validating constraints in a modular way.