Dimensional analysis with C++

  title={Dimensional analysis with C++},
  author={Robert F. Cmelik and Narain H. Gehani},
  journal={IEEE Software},
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… 

Figures and Tables from this paper

Fully static dimensional analysis with C++
This paper describes how an existing language C++ can be used to write programs which can be guaranteed to be dimensionally correct before run-time, and argues that the rule forbidding the construct should be moved from the language definition.
Dimensional Inference Using Symbol Lives
A novel approach which employs the concept of symbol lives to analyse the dimensional implications of the users source code, implemented for Fortran programs in the software engineering toolkit, WinFPT, is described.
A framework for type system definition and manipulation in C++
  • E. Reshef, J. Gil
  • Computer Science
    Eighteenth Convention of Electrical and Electronics Engineers in Israel
  • 1995
An extendible class library in C++ is implemented that presents types as first class values, and uses a simple syntax to allow easy definition, creation and manipulation of types.
Structural Matrix Computations with Units: Data Structures, Algorithms, and Scripting Language Design
Aladdin employs a novel combination of system programming languages, scripting language concepts, and stack machine technology that offers enhanced type checking for expressions and assignments, problem oriented scaling of variables, automatic conversion of systems of units, and program control structures for the solution of engineering problems.
A Domain-Specific Language and Editor for Parallel Particle Methods
The Parallel Particle-Mesh Environment is presented, a DSL and development environment for numerical simulations based on particle methods and hybrid particle-mesh methods, and an explicit domain model for particle abstractions and the first formal type system for particle methods are presented.
A pragmatic approach to dimensional analysis for mobile robotic programming
A new system for managing dimensioned data in robot software is presented and a new primitive data type is provided, which improves program readability and writability and is found to be an improvement.
Introduction to the literature on object-oriented design, programming, and languages
This paper is an introduction to the literature on object-oriented design, object-oriented programming, a few programming languages (especially C++), and some related topics in language design.This
Testing object-oriented software systems
The inheritance feature, more than any, makes OOP a viable approach.
A Design for Dimensional Analysis in Robotics
A new system is presented for managing dimensioned data in robot software that removes much of the hard work of using and ensuring correctness in dimensional data and allowing mixing of units using dimensional analysis.
The next 700 unit of measurement checkers
There is clearly too much diversity, duplicated efforts, and a lack of code sharing and harmonisation which discourages use and adoption of physical quantity open-source libraries.


An Ada package for dimensional analysis
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
Units of Measure as a Data Attribute
Ada's derived types and units of measure
  • N. Gehani
  • Computer Science
    Softw. Pract. Exp.
  • 1985
The proposed solution to the problem of detecting the inconsistent usage of objects in Ada by specification of units of measure solves the problem elegantly and conveniently.
Databases and Units of Measure
  • N. Gehani
  • Computer Science
    IEEE Transactions on Software Engineering
  • 1982
A serious impediment to the integrated use of databases across international boundaries, scientific disciplines and application areas is the use of different units of measure, e.g., miles or
Incorporation of units into programming languages
The issues of how a programming language might aid in keeping track of physical units (feet, sec, etc.) are discussed and a method is given for the introduction of relationships among units and subsequent automatic conversion based upon these relationships.
A Proposal for an Extended Form of Type Checking of Expressions
Cet article propose une methode pour l'incorporation de la notion scientifique de systeme d'unites de mesure dans les langages de programmation
C++ Programming Language
Bjarne Stroustrup makes C even more accessible to those new to the language, while adding advanced information and techniques that even expert C programmers will find invaluable.