domenica 26 giugno 2011

Quantities, Units and Values an Object Oriented Implementation


Software for simulation or real time software typically manipulate physical quantities and a solid foundation of quantities, units and dimensions is a key issue. Common software languages not provide a native support to express units and quantities in order to avoid wrong assignment and comparisons or to do an automatic dimensional analysis. This is the cause of loss of time and trouble and in the worst case as the famous Mart Climate Orbiter the failure of the mission for a conversion error between system of units.

Model Library for Quantities, Units, Dimensions and Values (QUDV) of sysML provides a solid model to express system physical properties. It provides an abstract syntax of the library expressed by a sequence of block diagrams.
 
We present a concrete implementation of the QUDV abstract model through an object oriented implementation following the class diagram in the figure below. Our formulation is concentrate to provides the basis for defining basic units and others units via conversion or derivation.

Figure 1 Class Diagram

Also it to provides the definition of a system of units where is possible to specify coherent derived units as a product of base unit. In this version of the library we miss the part for defining a declarative specification of dimensional analysis assigning an expression and its dependencies to each quantity kind. (It is an open issue to do)

For the complete article follows the link http://www.codeproject.com/KB/vb/quantity.aspx

References

Quantities, Units, Dimensions, Values (QUDV)

Eric Allen, David Chase, Victor Luchangco, Jan-Willem Maessen, and Guy L. Steele, Jr.. 2004. 
Object-oriented units of measurement. In Proceedings of the 19th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications (OOPSLA '04). ACM, New York, NY, USA, 384-403. DOI=10.1145/1028976.1029008 http://doi.acm.org/10.1145/1028976.1029008

Nessun commento:

Posta un commento