Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

Dimensional Analysis with C++

Published: 01 May 1988 Publication History

Abstract

Incorporating dimensional-analysis facilities in a language lets an environment detect an additional class of errors, but at the expense of requiring a change to the language you used. However, if the language you used has suitable data-abstraction facilities, most of the benefits of dimensional analysis can be had without changing the language. To demonstrate how to get these benefits, the authors use the data-abstraction facilities of C++ to implement dimensional analysis. C++ is an upwardly compatible extension of C that provides data-abstraction facilities called classes. The authors define a set of classes that allows the writing of programs with automatic checking of units (i.e. dimensional analysis) and automatic conversion between consistent (compatible or equivalent) units. They discuss the pros and cons of this approach and compare the advantage C++ has over Ada for implementing dimensional analysis.

References

[1]
1. N.H. Gehani, "Units of Measure as a Data Attribute," Computer Languages, No. 3, 1977, pp. 93-111.
[2]
2. N.H. Gehani, "Ada's Derived Types and Units of Measure," Software Practice and Experience, June 1985, pp. 555-569.
[3]
3. M. Karr and D.B. Loveman III, "Incorporation of Units into Programming Languages," Comm. ACM, May, 1978, pp. 385-391.
[4]
4. R.T. House, "A Proposal for an Extended Form of Type Checking of Expressions," Computer Journal, No. 4, 1984, pp. 366-374.
[5]
5. B. Stroustrup, The C++ Programming Language, Addision-Wesley, Reading, Mass., 1986.
[6]
6. B.W. Kernighan and D.M. Ritchie, The C Programming Language, Prentice-Hall, Englewood Cliffs, N.J., 1978.
[7]
7. N.H. Gehani, "Databases and Units of Measure," IEEE Trans. Software Eng., June 1982, pp. 605-611.
[8]
8. R.C. Pankhurst, Dimensional Analysis and Scale Factors, Chapman & Hall, London, 1964.
[9]
9. P.N. Hilfinger, "An Ada Package for Dimensional Analysis," tech. report, Computer Science Div., Univ. of California, Berkeley, Calif., 1985.

Cited By

View all
  • (2021)Deriving equations from sensor data using dimensional function synthesisCommunications of the ACM10.1145/346521664:7(91-99)Online publication date: 21-Jun-2021
  • (2021)An Empirical Study on Type AnnotationsACM Transactions on Software Engineering and Methodology10.1145/343977530:2(1-29)Online publication date: 10-Feb-2021
  • (2019)Deriving Equations from Sensor Data Using Dimensional Function SynthesisACM Transactions on Embedded Computing Systems10.1145/335821818:5s(1-22)Online publication date: 8-Oct-2019
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image IEEE Software
IEEE Software  Volume 5, Issue 3
May 1988
106 pages

Publisher

IEEE Computer Society Press

Washington, DC, United States

Publication History

Published: 01 May 1988

Author Tags

  1. C language
  2. C++
  3. classes
  4. data structures
  5. data-abstraction
  6. dimensional-analysis
  7. environment
  8. programming environments

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 15 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2021)Deriving equations from sensor data using dimensional function synthesisCommunications of the ACM10.1145/346521664:7(91-99)Online publication date: 21-Jun-2021
  • (2021)An Empirical Study on Type AnnotationsACM Transactions on Software Engineering and Methodology10.1145/343977530:2(1-29)Online publication date: 10-Feb-2021
  • (2019)Deriving Equations from Sensor Data Using Dimensional Function SynthesisACM Transactions on Embedded Computing Systems10.1145/335821818:5s(1-22)Online publication date: 8-Oct-2019
  • (2018)The next 700 unit of measurement checkersProceedings of the 11th ACM SIGPLAN International Conference on Software Language Engineering10.1145/3276604.3276613(121-132)Online publication date: 24-Oct-2018
  • (2018)A Domain-Specific Language and Editor for Parallel Particle MethodsACM Transactions on Mathematical Software10.1145/317565944:3(1-32)Online publication date: 23-Mar-2018
  • (2010)SafeGIProceedings of the 21st Eurographics conference on Rendering10.1111/j.1467-8659.2010.01722.x(1269-1277)Online publication date: 28-Jun-2010
  • (2008)A pragmatic approach to dimensional analysis for mobile robotic programmingAutonomous Robots10.1007/s10514-008-9103-x25:4(405-419)Online publication date: 1-Nov-2008
  • (1994)Fully static dimensional analysis with C++ACM SIGPLAN Notices10.1145/185009.18503629:9(135-139)Online publication date: 1-Sep-1994
  • (1991)Introduction to the literature on object-oriented design, programming, and languagesACM SIGPLAN OOPS Messenger10.1145/126983.1269882:4(40-53)Online publication date: 1-Oct-1991
  • (1990)Testing object-oriented software systemsProceedings of the 1990 ACM annual conference on Cooperation10.1145/100348.100373(161-165)Online publication date: 1-Jan-1990

View Options

View options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media