TY - GEN
T1 - Lightweight detection of physical unit inconsistencies without program annotations
AU - Ore, John Paul
AU - Detweiler, Carrick
AU - Elbaum, Sebastian
N1 - Publisher Copyright:
© 2017 Association for Computing Machinery.
PY - 2017/7/10
Y1 - 2017/7/10
N2 - Systems interacting with the physical world operate on quantities measured with physical units. When unit operations in a program are inconsistent with the physical units' rules, those systems may suffer. Existing approaches to support unit consistency in programs can impose an unacceptable burden on developers. In this paper, we present a lightweight static analysis approach focused on physical unit inconsistency detection that requires no end-user program annotation, modification, or migration. It does so by capitalizing on existing shared libraries that handle standardized physical units, common in the cyber-physical domain, to link class attributes of shared libraries to physical units. .en, leveraging rules from dimensional analysis, the approach propagates and infers units in programs that use these shared libraries, and detects inconsistent unit usage. We implement and evaluate the approach in a tool, analyzing 213 open-source systems containing +900, 000 LOC, finding inconsistencies in 11% of them, with an 87% true positive rate for a class of inconsistencies detected with high confidence. An initial survey of robot system developers finds that the unit inconsistencies detected by our tool are 'problematic', and we investigate how and when these inconsistencies occur.
AB - Systems interacting with the physical world operate on quantities measured with physical units. When unit operations in a program are inconsistent with the physical units' rules, those systems may suffer. Existing approaches to support unit consistency in programs can impose an unacceptable burden on developers. In this paper, we present a lightweight static analysis approach focused on physical unit inconsistency detection that requires no end-user program annotation, modification, or migration. It does so by capitalizing on existing shared libraries that handle standardized physical units, common in the cyber-physical domain, to link class attributes of shared libraries to physical units. .en, leveraging rules from dimensional analysis, the approach propagates and infers units in programs that use these shared libraries, and detects inconsistent unit usage. We implement and evaluate the approach in a tool, analyzing 213 open-source systems containing +900, 000 LOC, finding inconsistencies in 11% of them, with an 87% true positive rate for a class of inconsistencies detected with high confidence. An initial survey of robot system developers finds that the unit inconsistencies detected by our tool are 'problematic', and we investigate how and when these inconsistencies occur.
KW - Dimensional analysis
KW - Physical units
KW - Program analysis
KW - Robotic systems
KW - Static analysis
KW - Type checking
KW - Unit consistency
UR - http://www.scopus.com/inward/record.url?scp=85026645167&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=85026645167&partnerID=8YFLogxK
U2 - 10.1145/3092703.3092722
DO - 10.1145/3092703.3092722
M3 - Conference contribution
AN - SCOPUS:85026645167
T3 - ISSTA 2017 - Proceedings of the 26th ACM SIGSOFT International Symposium on Software Testing and Analysis
SP - 341
EP - 351
BT - ISSTA 2017 - Proceedings of the 26th ACM SIGSOFT International Symposium on Software Testing and Analysis
A2 - Sen, Koushik
A2 - Bultan, Tevfik
PB - Association for Computing Machinery, Inc
T2 - 26th ACM SIGSOFT International Symposium on Software Testing and Analysis, ISSTA 2017
Y2 - 10 July 2017 through 14 July 2017
ER -