The vocabulary used to describe quantities varies from one domain to another. For this reason, it is essential to be able to define new dimensions and units. Often, these will be derived from the base set of SI dimensions and units (e.g. an electro-magnetic domain theory might define a dimension for magnetic-flux and its SI derived unit, the Weber). In non-physical domains, new dimensions and units must be introduced (e.g. an economics theory might define a dimension for currency and units such as dollar, yen, mark, and so on). The top-level forms defDimension and defUnit provide this facility. The top-level form defConstantQuantity is also provided for defining global named constants.
(defDimension Dim name := dimension expression)
Figure: Basic and derived dimensions are defined with the
defDimension form.
If the optional dimension expression is not provided, then the new dimension may not be reducible to other dimensions (See section , page for the complete syntax).
A CML base domain theory provides definitions for all of the basic SI dimensions: time-dimension, length-dimension, temperature-dimension, mass-dimension, luminosity-dimension, charge-dimension, amount-dimension (usually measured in moles), and dimensionless.
The semantics of the defDimension for is simply:
(defUnit Unit name[:= quantity expression]
[:dimension dimension expression ] )
Figure: Basic and derived units are defined with the defUnit form.
If the := argument is absent, then a fundamental unit is being defined, and the :dimension must be provided (as in the meter example). Otherwise, if the :dimension argument is absent, then it defaults to the dimension of the quantity expression. In case the expression is complex, it may be more informative to provide the dimension explicitly.
The CML base domain theory will provide definitions for the common SI units including the base units, meter, kilogram, second, ampere, Kelvin, mole, and candela, as well as the derived units Hertz, Newton, Pascal, Joule, Watt, Coulomb, volt, Farad, ohm, Siemens, Weber, Tesla, and Henry.
The semantics of the defUnit form is simply
:= quantity expression
[ :dimension dimension expression ] )
(dēfConstantQuantity Const name
Figure: Global symbolic constants are defined with the
defConstantQuantity form.