T. Mayerhofer, M. Wimmer, A. Vallecillo: Adding Uncertainty and Units to Quantity Types in Software Models, 9th International Conference on Software Language Engineering Conference (SLE 2016), Amsterdam, NL; 31.10.2016 - 01.11.2016; in Proceedings of the 2016 ACM SIGPLAN International Conference on Software Language Engineering (SLE'16)", ACM, (2016), pages 118 - 131. doi: 10.1145/2997364.2997376


Although several software modeling languages permit therepresentation of key aspects of physical entities, such asunits, precision or measurement uncertainty, these aspectsare not typically incorporated into their type systems. There-fore, operating with such properties is normally cumber-some and contrived. This paper shows how both data uncer-tainty and units can be captured in software models and nat-urally incorporated into their type systems. In particular, wepresent extensions of the UML/OCL typeRealand define aset of operations on values of these new types. Furthermore,we show how they can be used in software models to carryout computations that consider measurement uncertainty andpermit the detection of unit mismatches when trying to op-erate with their values.