| Object-oriented units of measurement |
| Full text |
Pdf
(297 KB)
|
| Source
|
Conference on Object Oriented Programming Systems Languages and Applications
archive
Proceedings of the 19th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
table of contents
Vancouver, BC, Canada
SESSION: Languages
table of contents
Pages: 384 - 403
Year of Publication: 2004
ISBN:1-58113-831-9
Also published in ...
|
|
Authors
|
|
Eric Allen
|
Sun Microsystems Laboratories, Burlington, MA
|
|
David Chase
|
Sun Microsystems Laboratories, Burlington, MA
|
|
Victor Luchangco
|
Sun Microsystems Laboratories, Burlington, MA
|
|
Jan-Willem Maessen
|
Sun Microsystems Laboratories, Burlington, MA
|
|
Guy L. Steele, Jr.
|
Sun Microsystems Laboratories, Burlington, MA
|
|
| Sponsors |
|
| Publisher |
|
| Bibliometrics |
Downloads (6 Weeks): 10, Downloads (12 Months): 74, Citation Count: 6
|
|
|
ABSTRACT
Programs that manipulate physical quantities typically represent these quantities as raw numbers corresponding to the quantities' measurements in particular units (e.g., a length represented as a number of meters). This approach eliminates the possibility of catching errors resulting from adding or comparing quantities expressed in different units (as in the Mars Climate Orbiter error [11]), and does not support the safe comparison and addition of quantities of the same dimension. We show how to formulate dimensions and units as classes in a nominally typed object-oriented language through the use of statically typed metaclasses. Our formulation allows both parametric and inheritance poly-morphism with respect to both dimension and unit types. It also allows for integration of encapsulated measurement systems, dynamic conversion factors, declarations of scales (including nonlinear scales) with defined zeros, and nonconstant exponents on dimension types. We also show how to encapsulate most of the "magic machinery" that handles the algebraic nature of dimensions and units in a single meta-class that allows us to treat select static types as generators of a free abelian group.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
 |
1
|
Eric Allen , Jonathan Bannet , Robert Cartwright, A first-class approach to genericity, Proceedings of the 18th annual ACM SIGPLAN conference on Object-oriented programing, systems, languages, and applications, October 26-30, 2003, Anaheim, California, USA
|
| |
2
|
|
 |
3
|
|
 |
4
|
Gilad Bracha , David Griswold, Strongtalk: typechecking Smalltalk in a production environment, Proceedings of the eighth annual conference on Object-oriented programming systems, languages, and applications, p.215-230, September 26-October 01, 1993, Washington, D.C., United States
|
| |
5
|
W. Brown. Applied Template Metaprogramming in SIUnits: the Library of Unit-Based Computation. In Proceedings of the Second Workshop on C++ Template Programming, October 2001. Available at http://www.oonumerics.org/tmpw01/brown.pdf.
|
 |
6
|
Robert Cartwright , Guy L. Steele, Jr., Compatible genericity with run-time types for the Java programming language, Proceedings of the 13th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.201-215, October 18-22, 1998, Vancouver, British Columbia, Canada
|
| |
7
|
J.C. Cleaveland. Redundant Specification in Programming Languages Through Pouches. UCLA Technical Report. 1975.
|
 |
8
|
|
| |
9
|
D. Ferrucci, C. Welty. What's in an Instance? RPI Computer Science Technical Report. 1994.
|
| |
10
|
|
| |
11
|
D. Isbell, D. Savage. Mars Climate Orbiter Failure Board Releases Report, Numerous NASA Actions Underway in Response. NASA Press Release 99-134. http://nssdc.gsfc.nasa.gov/planetary/text/mco pr 19991110.txt. Nov. 10, 1999.
|
| |
12
|
|
| |
13
|
N. Gehani. Units of Measure as a Data Attribute. Computer Languages, Vol. 2. pp. 93--111. Pergamon Press, 1977. Printed in Great Britain.
|
| |
14
|
N. Gehani. Databases and Units of Measure. IEEE Transactions on Software Engineering. Vol. SE-8, No. 6, November 1982.
|
| |
15
|
|
| |
16
|
J. Goubault. Inference d'unites physiques en ML. In P. Cointe, C. Queinnec, and B. Serpette, editors, Journees Francophones des Langages Applicatifs, Noirmoutier, p.3--20. INRIA, Collection didactique, 1994.
|
 |
17
|
|
| |
18
|
|
 |
19
|
|
| |
20
|
|
| |
21
|
A. Kennedy. Programming Languages and Dimensions. PhD Thesis. St. Catharine's College. November 1995.
|
 |
22
|
|
 |
23
|
|
| |
24
|
P. Neumann. Risks to the public from the use of computers. ACM Software Engineering Notes, 10(3) July 1985.
|
| |
25
|
M. Sulzmann, The Chameleon website. http://www.comp.nus.edu.sg/ sulzmann/chameleon/
|
| |
26
|
|
| |
27
|
|
| |
28
|
M. Wand, P. M. O'Keefe. Automatic dimensional inference. In J.-L. Lassez and G. Plotkin, editors, Computational Logic: Essays in Honor of Alan Robinson. MIT Press, 1991.
|
| |
29
|
|
CITED BY 6
|
|
|
|
|
Hernán Wilkinson , Máximo Prieto , Luciano Romeo, Arithmetic with measurements on dynamically-typed object-oriented languages, Companion to the 20th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, October 16-20, 2005, San Diego, CA, USA
|
|
|
|
|
|
Philip J. Guo , Jeff H. Perkins , Stephen McCamant , Michael D. Ernst, Dynamic inference of abstract types, Proceedings of the 2006 international symposium on Software testing and analysis, July 17-20, 2006, Portland, Maine, USA
|
|
|
|
|
|
|
|