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
An Ada package for dimensional analysis
ACM Transactions on Programming Languages and Systems (TOPLAS)
Relational parametricity and units of measure
Proceedings of the 24th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Proceedings of the ACM SIGPLAN 1999 conference on Programming language design and implementation
A reusable Ada package for scientific dimensional integrity
ACM SIGAda Ada Letters
POPL '77 Proceedings of the 4th ACM SIGACT-SIGPLAN symposium on Principles of programming languages
CIL: Intermediate Language and Tools for Analysis and Transformation of C Programs
CC '02 Proceedings of the 11th International Conference on Compiler Construction
A first-class approach to genericity
OOPSLA '03 Proceedings of the 18th annual ACM SIGPLAN conference on Object-oriented programing, systems, languages, and applications
Object-oriented units of measurement
OOPSLA '04 Proceedings of the 19th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
Osprey: a practical type system for validating dimensional unit correctness of C programs
Proceedings of the 28th international conference on Software engineering
The rewriting logic semantics project
Theoretical Computer Science
Rule-based analysis of dimensional safety
RTA'03 Proceedings of the 14th international conference on Rewriting techniques and applications
The spec# programming system: an overview
CASSIS'04 Proceedings of the 2004 international conference on Construction and Analysis of Safe, Secure, and Interoperable Smart Devices
Units of measure as a data attribute
Computer Languages
Hi-index | 0.00 |
Many C programs assume the use of implicit domain-specific information. A common example is units of measurement, where values can have both a standard C type and an associated unit. However, since there is no way in the C language to represent this additional information, violations of domain-specific policies, such as unit safety violations, can be difficult to detect. In this paper we present a static analysis, based on the use of an abstract C semantics defined using rewriting logic, for the detection of unit violations in C programs. In contrast to typed approaches, the analysis makes use of annotations present in C comments on function headers and in function bodies, leaving the C language unchanged. Initial evaluation results show that performance scales well, and that errors can be detected without imposing a heavy annotation burden.