**Overview**

Uncertainty is an inherent property of any measure or estimation performed in any physical setting, and therefore it needs to be considered when modeling systems that manage real data. Although several modeling languages permit the representation of measurement uncertainty for describing certain system attributes, these aspects are not normally incorporated into their type systems. Thus, operating with uncertain values and propagating uncertainty are normally cumbersome processes, difficult to achieve at the model level. This work proposes an extension of OCL and UML basic datatypes to incorporate data uncertainty coming from physical measurements or user estimations into the models, along with the set of operations defined for the values of these types.

In this website the complete case studies and software artifacts we reference in our submission are available for download.

**Case Studies (under development)**

**Train Case Study**

The case study described in [1] has been fully implemented in the USE tool [2], which has been properly extended to include our uncertain types as basic types and collections. Both implementations of our case study (with and without uncertainty), can be downloaded from here.

The system used as a case study is composed of people, trains and stations (see figure below). Both persons and trains move towards stations. For simplicity, we assume they all move in one single direction. Monitors observe their movements, and record their last two positions and the time in which they were observed. The speed is automatically calculated from this information, as well as the expected time to arrive at the station. For a person it is also important to know if she will be able to catch her target train, i.e., reach the station at least 3 seconds before the train does.

All these calculations can be specified by means of OCL expressions:

context MovingObject::speed:Real

derive: (self.current.position-self.previous.position) / (self.current.time-self.previous.time)

context MovingObject::timeToStation: Real

derive: (self.headsTo.position-self.current.position) / self.speed

context Person::arrivesOnTime:Boolean

derive: (self.timeToStation + 3) <= self.targetTrain.timeToStation

Note, however, that in practice all these attributes and operations are subject to uncertainty: positions and times are never 100% precise, and this imprecision is propagated to derived values and estimated times. For example, suppose our positioning system is correct up to one centimeter, and our clock has a precision of 1 second. This can be captured in our model by types UReal and UBoolean, respectively, which extend basic types Real and Boolean with measurement uncertainty, and permit expressing and propagating through the types' operations such uncertainty.

**Downloads**

The Java and OCL/UML specifications of the uncertain types and operations as well as their implementations are available from:

The extended version of USE which includes uncertain datatypes as primitive types can be downloaded from here, and a simple example showing how to use them along with the uncertain collections from here.

**References**

[1] Manuel F. Bertoa, Nathalie Moreno, Gala Barquero, Loli Burgueño, Javier Troya, and Antonio Vallecillo:
"Expressing Measurement Uncertainty in OCL/UML Datatypes". In Proc. of ECMFA 2018, LNCS, Springer 2018.

[2] Gogolla, M., Büttner, F., Richters, M.: "USE: A UML-based specification environment for validating UML and OCL." Sci. Comp. Prog. 69 (2007) 27-34