Runtime adaptability to domain model changes with efficient constraint checking
On November 27, 2015, Alberto Manuel Fernández-Álvarez defended his PhD thesis on Runtime adaptability to domain model changes with efficient constraint checking at the University of Oviedo. He presented his dissertation in a publicly open presentation held in the School of Computing (Fig. 1). After commenting on every question raised by the assessing committee, he was awarded the highest grade possible (cum laude).
The thesis was supervised by Dr. Daniel Fernández-Lanvin and Dr. Raúl Izquierdo. The PhD dissertation Committee was composed of Professor Juan Manuel Cueva-Lovelle (University of Oviedo), Dr. J. Baltasar Garcia Perez-Schofield (University of Vigo), and Dr. Beatriz Pérez-Valle (University of La Rioja).
This research work has been funded by the European Union, through the European Regional Development Funds (ERDF); and the Principality of Asturias, through its Science, Technology and Innovation Plan (grant GRUPIN14-100).
Fig. 1.
1.Thesis summary
This thesis discusses the management of domain constraints to support the implementation of adaptable and collaborative pervasive applications. In this type of applications, the behavior of mobile devices is dynamically adapted not only depending on the data gathered by the device, but as a result of a dynamic learning process supported on the information gathered from all the devices involved in the experience. This process of learning, synthesis and readjustment of domain rules is usually executed on a server, given the computational load and coordination processes required.
Once the domain model has been adapted on the server, it is needed to migrate it to the devices, sometimes of a different nature, which are affected by the new model of the context. To perform this, it is imperative that the adaptation of these domain rules be done dynamically and in real time.
The most powerful and popular language for the representation of these domain rules (as constraints) is OCL. However, there is no support in OCL to facilitate the automation of this adaptation, which requires developers to implement ad hoc, expensive and difficult to maintain solutions.
Fig. 2.
The work presented is part of a project to support the automatic slicing of domain models. This is structured in two stages:
The defended thesis deals with the first stage of the work. The proposed process analyzes the constraints and the domain model, and then produces executable code that automatically checks the fulfillment of the required constraints at the end of the business operations (Fig. 2).
The generated code checks the constraints in an optimized way due to its incremental nature. An optimized, event-oriented, new version of each constraint is executed only if its specific firing event has occurred to an object instance in the graph of the domain model. This way, the system does not need to check every constraint against every object, then obtaining great improvements in performance.
That analysis process is as follows:
Constraints are classified according to the model element they affect and to the state changes. By affected model element, a constraint can be of type: attribute, object, class and domain. By state change, a constraint can be static, if only affects the current state, or dynamic, if it restricts the change from the previous state to the current one.
With an analysis process over the syntactic structure of the constraint (the AST), it is possible to detect what graph events (creation of new objects, deletions, linkages, etc.) can affect each constraint.
A subsequent process gets new versions of the constraints optimized for each type of event. These will be more efficient by involving fewer objects of the graph.
The final step is to generate the code for event detection and constraint verification. This generated code is supported by a runtime that deals with the detected events and delays the checks until the end of the business operation. When the operation is committed, the stored events are filtered to remove duplications and the appropriate checks are carried out.
As a result the generated code is highly optimized for the checking of constraints obtaining great performance improvements.
References
[1] | A.-M. Fernández-Álvarez, D. Fernández-Lanvin and M. Quintela-Pumares, Invariant implementation for domain models applying incremental OCL techniques, in: Software Technologies: 10th International Joint Conference, ICSOFT 2015, Colmar, France, July 20–22, 2015, Revised Selected Papers, P. Lorenz, J. Cardoso, A.L. Maciaszek and M. van Sinderen, eds, Springer International Publishing, Cham, (2016) , pp. 137–154. |
[2] | M. Quintela-Pumares, D. Fernández-Lanvin, A.-M. Fernández-Álvarez and R. Izquierdo Castanedo, Automatic classification of domain constraints for rich client development, in: ICSEA 2014, the Ninth International Conference on Software Engineering Advances, Nice, France, 2014, September (2015) . |