The expression and management of uncertainty, both in the information and in the operations that manipulate it, is a critical issue in those systems that work with physical environments. Measurement uncertainty can be due to several factors, such as unreliable data sources, tolerance in the measurements, or the inability to determine if a certain event has actually happened or not. In particular, this contribution focuses on the expression of one kind of uncertainty, namely the confidence on the model elements, i.e., the degree of belief that we have on their occurrence, and on how such an uncertainty can be managed and propagated through model transformations, whose rules can also be subject to uncertainty.
In this companion website to our work , the complete case studies and software artifacts we reference in our paper are available for download.
In the surveillance system there are drones which are in charge of ensuring that no unidentified object gets close to the area they protect. For simplicity, we assume that all objects move in a planar surface (and thus their position is given by a pair of coordinates x and y); in the direction dictated by their angle attribute (expressed in radians), and with a given speed (in m/s). The size of a moving object is determined by its diameter (attribute width, also in meters).
When executing the system, the movements are performed by the operation move() which updates the coordinates of the object based on its current angle and speed, and the number of elapsed seconds since the last movement.
If a drone detects that an unidentified object is moving at a speed higher than 30 m/s and gets closer than 1000 m to its position, the drone identifies it as a threat, and shoots at it. The shot is represented by a new object of class Gunshot. Its attribute hitsTarget is an uncertain boolean because of the measurement uncertainty of the variables, and the tolerance of the shooting instruments.
The figure below shows the metamodel for this system:
Note the use of variables of types UReal and UBoolean, which represent uncertain reals and booleans, respectively (you can read more about this here). We need to use these datatypes because, when dealing with real-world entities, models need to take into account the inability to know, estimate or measure with complete precision the value of the represented quantities.
The behavior of the system can be represented by means of an in-place model transformation that determines how the state of the system evolves with time, as follows:
- For every UnidentifiedObject (with a confidence greater than 0.65) moving at a speed higher than 30 m/s, which has not already been shot (with a confidence of hitting the target higher than 0.95), and with a drone less than 1000 m away from it, a GunShot object (that relates the drone with the target) will be created.
- The coordinates of all moving objects will be updated, using their move() operation. In this case, the value of the argument is 1, assuming that the MT simulates the behavior of the system every second.
- The attribute now of Clock will also be updated, reflecting the passage of that time.
Social media recommendation system
This is an example of a predictive model in a social media environment. This system, at the basic level, contains Users and Items. Users follow other users and like items. Items can be pictures, tweets, or products from a catalog. We are interested in modeling a system whose behavior, in addition to representing these elements and their relations, is also able to infer further relationships. The metamodel is as follows:
Note that we have reified the relations Like and Follow to be able to assign confidence to them, making them regular classes. For example, a business rule can estimate that if more than 200 followers of a user like an item, it is quite likely that the user likes it too. Similarly, if user A likes more than two thirds of the likings of user B, it may be the case that A could be interested in following B, too. A model transformation can be in charge of recalculating all relationships and their confidence after a user manually creates or removes a relationship, or accepts or rejects one suggested by the system. Here we assume that links defined by users have a confidence of 1.0 and links derived by the system will have a smaller confidence. Then the user could accept them (modifying its confidence to 1.0) or reject them (making it 0.0 or simply removing the derived link from the model).
The behavior of the system can be represented by means of an in-place model transformation whose behavior is as follows. For each user u and item i, a rule counts those users who are related to her through a Follow relationship with a confidence higher than 0.95 and, from those, the rule selects those who like the item i with a confidence higher than 0.85. Then, the rule checks whether the number of such followers is higher than 500 and there is no previous Like relationship between the user u and the item i. If so, it creates a Like object representing such a relationship.
The LinTra code that implements this model transformation as well as the models and metamodels we have used are available for download in our Git repository .
This is an example of run-time models taken from the Complex Event Processing (CEP) domain. This system simulates a smart house, with sensors that permit detecting three basic parameters: temperature, carbon monoxide (CO) level, and whether the main door is open or not. These values are periodically sensed and notified by means of events, as well as the position of the people living in the house.
The following figure shows the metamodel of the system.
The classes Person and Home represent the CEP simple events while the classes shaded with darker background color represent the complex events defined by the application whose behavior is:
- Create a TempIncr object every time the temperature of the house has increased 2 or more degrees in less than one minute.
- Create a TempWarning object when four TempIncr events are detected in less than 5 minutes, while temperature remains above 33 degrees.
- Create a COHigh object each time the CO levels exceed 5000 units.
- Create a FireWarning object if a COHigh event is detected, followed by a TempWarning event within less than 5 seconds.
- Create a NobodyHome object if the main door of the house is closed and there is no person within the perimeter of the house.
- Create a Call object if a FireWarning occurs after a NobodyHome object is created.
 Loli Burgueño, Nathalie Moreno, Manuel F. Bertoa, Antonio Vallecillo: Expressing Confidence in Models and Model Transformation Elements. In Proc. of the ACM/IEEE 21th International Conference on Model Driven Engineering Languages and Systems 2018 (MODELS 2018). Copenhagen, Denmark, October 2015.
 LinTra Git repository, 2018. https://github.com/atenearesearchgroup/lintra.git. Accessed: July 2018.