Next: Conclusions
Up: Fully Static Dimensional Analysis
Previous: An Example
The advantages of the proposed method are as follows:
- Full analysis of dimensional correctness before run-time.
- No run-time space overhead for dimensional data, unlike the
method proposed in [CG88]. Space is used for storing
conversion factors and print-names, but similar amounts of space
would be used by any method which converted between units or
printed them out.
- Once compiler technology for processing inline template
functions is sufficiently developed, there should not be any
substantial time or code-space overhead. This follows from the
statement on pg. 342 of the ARM that the C++ template mechanism
``allows close to optimal run-time performance through macro
expansion of definitions and inlining of function calls.''
- The method almost fits into an existing language and is
accepted by an existing compiler. This is in contrast to methods
like those in [Geh77] or [Hou83] which require
changes to existing languages.
- Higher programmer productivity, since programmers need not
spend their time tracking down dimensional errors at run-time.
Some of the disadvantages of the method, along with possible
solutions are:
Next: Conclusions
Up: Fully Static Dimensional Analysis
Previous: An Example
zerksis umrigar (zdu@acm.org)
Fri Aug 8 15:41:40 EDT 1997