ACM Home Page
Please provide us with feedback. Feedback
An Ada package for dimensional analysis
Full text PdfPdf (1.02 MB)
Source ACM Transactions on Programming Languages and Systems (TOPLAS) archive
Volume 10 ,  Issue 2  (April 1988) table of contents
Pages: 189 - 203  
Year of Publication: 1988
ISSN:0164-0925
Author
Paul N. Hilfinger  Univ. of California, Berkeley
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 3,   Downloads (12 Months): 48,   Citation Count: 8
Additional Information:

abstract   references   cited by   index terms   review   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/42190.42346
What is a DOI?

ABSTRACT

This paper illustrates the use of Ada's abstraction facilities—notably, operator overloading and type parameterization—to define an oft-requested feature: a way to attribute units of measure to variables and values. The definition given allows the programmer to specify units of measure for variables, constants, and parameters; checks uses of these entities for dimensional consistency; allows arithmetic between them, where legal; and provides scale conversions between commensurate units. It is not constrained to a particular system of measurement (such as the metric or English systems). Although the definition is in standard Ada and requires nothing special of the compiler, certain reasonable design choices in the compiler, discussed here at some length, can make its implementation particularly efficient.





REVIEW

"Trevor R. Hanson : Reviewer"

Dimensional analysis is a technique used to verify that numeric quantities are used in accordance with their units of measure (e.g., lengths should not be added to masses). This paper is essentially a response to a statement by O'K  more...