Lightweight detection of physical unit inconsistencies without program annotations

John Paul Ore, Carrick Detweiler, Sebastian Elbaum

Research output: Chapter in Book/Report/Conference proceedingConference contribution

21 Scopus citations

Abstract

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.

Original languageEnglish (US)
Title of host publicationISSTA 2017 - Proceedings of the 26th ACM SIGSOFT International Symposium on Software Testing and Analysis
EditorsKoushik Sen, Tevfik Bultan
PublisherAssociation for Computing Machinery, Inc
Pages341-351
Number of pages11
ISBN (Electronic)9781450350761
DOIs
StatePublished - Jul 10 2017
Event26th ACM SIGSOFT International Symposium on Software Testing and Analysis, ISSTA 2017 - Santa Barbara, United States
Duration: Jul 10 2017Jul 14 2017

Publication series

NameISSTA 2017 - Proceedings of the 26th ACM SIGSOFT International Symposium on Software Testing and Analysis

Conference

Conference26th ACM SIGSOFT International Symposium on Software Testing and Analysis, ISSTA 2017
Country/TerritoryUnited States
CitySanta Barbara
Period7/10/177/14/17

Keywords

  • Dimensional analysis
  • Physical units
  • Program analysis
  • Robotic systems
  • Static analysis
  • Type checking
  • Unit consistency

ASJC Scopus subject areas

  • Computational Theory and Mathematics
  • Computer Science Applications
  • Software

Fingerprint

Dive into the research topics of 'Lightweight detection of physical unit inconsistencies without program annotations'. Together they form a unique fingerprint.

Cite this