Ada's derived types and units of measure
Software—Practice & Experience
A proposal for an extended form of type checking of expressions
The Computer Journal
Incorporation of units into programming languages
Communications of the ACM
Abstraction Mechanisms and Language Design
Abstraction Mechanisms and Language Design
Experiences with Ada Code Generation
Experiences with Ada Code Generation
Alternatives to keyword parameters
ACM SIGPLAN Notices
Object-oriented programming techniques with Ada: an example
ACM SIGAda Ada Letters
Fully static dimensional analysis with C++
ACM SIGPLAN Notices
Dimension inference under polymorphic recursion
FPCA '95 Proceedings of the seventh international conference on Functional programming languages and computer architecture
Conversion of Units of Measurement
IEEE Transactions on Software Engineering
Object-oriented units of measurement
OOPSLA '04 Proceedings of the 19th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
A package for handling units of measure in Lisp
ACM SIGPLAN Lisp Pointers
Osprey: a practical type system for validating dimensional unit correctness of C programs
Proceedings of the 28th international conference on Software engineering
Expressing measurement units in interfaces for scientific component software
Proceedings of the 2009 Workshop on Component-Based High Performance Computing
A survey of physical unit handling techniques in ada
Ada-Europe'03 Proceedings of the 8th Ada-Europe international conference on Reliable software technologies
Rule-based analysis of dimensional safety
RTA'03 Proceedings of the 14th international conference on Rewriting techniques and applications
A practical ontology framework for static model analysis
EMSOFT '11 Proceedings of the ninth ACM international conference on Embedded software
Checking SCADE models for correct usage of physical units
SAFECOMP'06 Proceedings of the 25th international conference on Computer Safety, Reliability, and Security
SafeGI: type checking to improve correctness in rendering system implementation
EGSR'10 Proceedings of the 21st Eurographics conference on Rendering
Implementation of a simple dimensionality checking system in Ada 2012
Proceedings of the 2012 ACM conference on High integrity language technology
A Rewriting Logic Approach to Static Checking of Units of Measurement in C
Electronic Notes in Theoretical Computer Science (ENTCS)
Hi-index | 0.00 |
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 variables and values. The definition given allows the programmer to specify units of measure for variables, constants, and parameters; checks uses of these entities for dimensional consistency; allows arithmetic between them, where legal; and provides scale conversions between commensurate units. It is not constrained to a particular system of measurement (such as the metric or English systems). Although the definition is in standard Ada and requires nothing special of the compiler, certain reasonable design choices in the compiler, discussed here at some length, can make its implementation particularly efficient.