A Discipline of Programming with Quantities
Steve McKeever

TL;DR
This paper introduces a named quantity layer that enhances dimensional analysis by safely managing different physical quantities, preventing errors in scientific and engineering computations involving units of measurement.
Contribution
It proposes a novel approach combining analysis and discipline to distinguish and handle different quantities, improving correctness in UoM-related computations.
Findings
The named quantity layer prevents mixing of different physical quantities.
The approach ensures safe handling of expressions involving multiple quantities.
It complements existing dimensional analysis tools with a focus on quantity differentiation.
Abstract
In scientific and engineering applications, physical quantities embodied as units of measurement (UoM) are frequently used. The loss of the Mars climate orbiter, attributed to a confusion between the metric and imperial unit systems, popularised the disastrous consequences of incorrectly handling measurement values. Dimensional analysis can be used to ensure expressions containing annotated values are evaluated correctly. This has led to the development of a large number of libraries, languages and validators to ensure developers can specify and verify UoM information in their designs and codes. Many tools can also automatically convert values between commensurable UoM, such as yards and metres. However these systems do not differentiate between quantities and dimensions. For instance torque and work, which share the same UoM, can not be interchanged because they do not represent the…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsEmbedded Systems Design Techniques · Distributed and Parallel Computing Systems · Model-Driven Software Engineering Techniques
