A Discipline of Programming with Quantities

10/22/2022
by   Steve McKeever, et al.
0

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 same entity. We present a named quantity layer that complements dimensional analysis by ensuring that values of different quantities are safely managed. Our technique is a mixture of analysis and discipline, where expressions involving multiplications are relegated to functions, in order to ensure that named quantities are handled soundly.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/17/2018

Physical-type correctness in scientific Python

The representation of units and dimensions in informatics systems is bar...
research
02/15/2023

Automated Reasoning for Physical Quantities, Units, and Measurements in Isabelle/HOL

Formal verification of cyber-physical and robotic systems requires that ...
research
05/05/2015

Mining Measured Information from Text

We present an approach to extract measured information from text (e.g., ...
research
06/03/2019

Optimal measurement network of pairwise differences

When both the difference between two quantities and their individual val...
research
04/21/2023

KitchenScale: Learning to predict ingredient quantities from recipe contexts

Determining proper quantities for ingredients is an essential part of co...
research
05/15/2023

CQE: A Comprehensive Quantity Extractor

Quantities are essential in documents to describe factual information. T...
research
02/26/2020

Scientific versus statistical modelling: a unifying approach

This paper addresses two fundamental features of quantities modeled and ...

Please sign up or login with your details

Forgot password? Click here to reset