Practice: Model-driven Observer Synthesis
This practice describes how observer implementations can be synthesized from constraints specified in the requirements documents.
Relationships
Purpose
Use model-driven development to transform specified constraints into observers that monitor these constraints at runtime.
Main Description

In adaptive systems, it is necessary to observe the system and react if the system enters an undesirable state or shows unwanted behaviour. For this purpose, feedback loops, operationalised as observer/controllers can be employed. This practice describes an automatic transformation to observer/controller implementations from constraints defined during requirements analysis.

A prerequisite of this practice is that constraints have been captured during requirements analysis. Ideally, these are expressed as OCL-contraints that define the correct states of the system. If the Define System Limitations and Constraints task from the practice Goal-driven Requirements Elicitation is performed, constraints should be available. At the same time, this ensures that a domain model containing the elements the constraints are defined on is available. Constraints can also be defined in a specialised document separate from the requirements model.

The process can be repeated after the requirements or the domain model have changed, according to a model-driven design (MDD) approach. Changed parts of the system models and implementation will be re-generated while existing models and code are preserved.

The basic approach is described in Steghöfer et al. - Synthesis of Observers for Autonomic Evolutionary Systems from Requirements Models.