Skip to content

Complex event driven quick fix generation

Istvan DAVID edited this page May 18, 2016 · 5 revisions

The related sources are available here.

Description of the scenario

The case study investigates a synchronization problem over live models. The synchronization process is augmented with live validation and design space exploration based quick fix generation for invalid model states. The example is motivated by [1] and [2].

The source domain model describes a generic infrastructure for cyber-physical systems (CPS) where applications (services) are dynamically allocated to connected hosts. The target domain model represents the system deployment configuration with stateful applications deployed on hosts. We aim to derive a deployment model from the CPS model, and then incremental model transformations are used to propagate changes in the CPS model to the deployment model.

As the source model undergoes changes (introduced by the user, for example), the CPS model might become invalid. For example, an invalid state can be reached if a model element in the CPS model is created, but its mandatory attributes are not set yet. In such cases, the automated synchronization between the CPS and the deployment model cannot proceed and manual guidance is required.

To identify invalid model states, well-formedness constraints are evaluated continuously over the source model, i.e. on every change. Events notifying a change in the validity (i.e. when a valid model becomes invalid or the other way round) are published on an event stream, constituting therefore an infinite streaming model (representing the prevailing validation state of the underlying source model).

Should an invalid state be identified, quick-fix suggestions are generated using design space exploration (DSE) techniques. Subsequently, the quick fixes are provided to the user in the form of a model transformation sequence to aid the process of recovering from the invalid state. The concept is illustrated in the figure below.

alt tag

Meaningful units of change in the source model can be achieved typically by non-atomic changes. For example, adding a new model element and subsequently setting a required reference to another model element. Such a compound change can lead to an eventual validity, although during the intermediate atomic steps the model can be in an invalid state. As an advanced scenario, we aim to introduce inconsistency tolerance to the process, i.e. define rules over the streaming validation model which will trigger quick-fix generation. Tolerance rules are depicted as complex event patterns and quick-fixes are generated only on matches of these specific patterns. Such a pattern can be, for example, "the model being in an invalid state during five consecutive atomic changes". Tolerance rules can be typically extracted from design processes, or defined manually, in both cases using suitable algebraic foundations. This problem is, however, not addressed in the current paper.

Scenarios In the case study, the following use cases have to be addressed:

  • capturing validation rules;
  • modeling and processing complex patterns model validation events;
  • defining quick fix generation rules in terms of design space exploration;
  • integration of the components implementing the above use cases.

Domain models We reuse the domain models from the EMF-IncQuery CPS Demonstrator:

Original contributions of this example

alt tag

References