The correct use of units in SBML can be an issue. LibSBML has strived to facilitate support for those users who wish to work with consistent units. LibSBML-5 provides fully checking of units and version 5.2 introduced a unit converter that will convert all units within a model to base SI units.
Obviously behind both the unit consistency validator and the unit converter there is a substantial infrastructure of code dealing with units. This infrastructure could be exploited to provide further functionality with respect to units, such as, deriving the units of variables whose units are not declared within the model.
LibSBML-5.9.0 included an SBMLInferUnitsConverter that determines the units of parameters whose units are undeclared. The scope of this converter is limited to where it is possible to determine the units from a very basic set of mathematical expressions. However it could be extended to be more comprehensive.