An Ada package for dimensional analysis
ACM Transactions on Programming Languages and Systems (TOPLAS)
A package for handling units of measure in Lisp
Lisp and Symbolic Computation
Precise interprocedural dataflow analysis via graph reachability
POPL '95 Proceedings of the 22nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Proceedings of the ACM SIGPLAN 1999 conference on Programming language design and implementation
LAPACK Users' guide (third ed.)
LAPACK Users' guide (third ed.)
Type-base flow analysis: from polymorphic subtyping to CFL-reachability
POPL '01 Proceedings of the 28th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
ESP: path-sensitive program verification in polynomial time
PLDI '02 Proceedings of the ACM SIGPLAN 2002 Conference on Programming language design and implementation
Conversion of Units of Measurement
IEEE Transactions on Software Engineering
ESOP '94 Proceedings of the 5th European Symposium on Programming: Programming Languages and Systems
Validating the Unit Correctness of Spreadsheet Programs
Proceedings of the 26th International Conference 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
Finding user/kernel pointer bugs with type inference
SSYM'04 Proceedings of the 13th conference on USENIX Security Symposium - Volume 13
A Type System Based on End-User Vocabulary
VLHCC '07 Proceedings of the IEEE Symposium on Visual Languages and Human-Centric Computing
Automatic dimension inference and checking for object-oriented programs
ICSE '09 Proceedings of the 31st International Conference on Software Engineering
Perturbing numerical calculations for statistical analysis of floating-point program (in)stability
Proceedings of the 19th international symposium on Software testing and analysis
A Rewriting Logic Approach to Static Checking of Units of Measurement in C
Electronic Notes in Theoretical Computer Science (ENTCS)
Hi-index | 0.00 |
Misuse of measurement units is a common source of errors in scientific applications, but standard type systems do not prevent such errors. Dimensional analysis in physics can be used to manually detect such errors in physical equations. It is, however, not feasible to perform such manual analysis for programs computing physical equations because of code complexity. In this paper, we present a type system to automatically detect potential errors involving measurement units. It is constraint-based: we model units as types and flow of units as constraints. However, standard type checking algorithms are not powerful enough to handle units because of their abelian group nature (e.g., being commutative, multiplicative, and associative). Our system combines techniques such as type inference and Gaussian Elimination to overcome this problem. We have implemented Osprey, a prototype of the system for C programs, and evaluated it on various test programs, including computational physics and mechanical engineering applications. Osprey discovered unknown errors in mature code; it is precise with few false positives; it is also efficient and scales to large programs---we have successfully used it to analyze programs with hundreds of thousands of lines of code.