Detecting Inconsistencies in Wrappers: A Case Study
Henning Femmer, Dharmalingam Ganesan, Mikael Lindvall, and David McComas
TU Munich, Germany; Fraunhofer CESE, USA; NASA Goddard Space Flight Center, USA
Track: Software Engineering in Practice
Session: Bug Detection
Exchangeability between software components such as operating systems, middleware, databases, and hardware components is a common requirement in many software systems. One way to enable exchangeability is to promote indirect use through a common interface and an implementation for each component that wraps the original component. As developers use the interface instead of the underlying component, they assume that the software system will behave in a specific way independently of the actual component in use. However, differences in the implementations of the wrappers may lead to different behavior when one component is changed for another, which might lead to failures in the field. This work reports on a simple, yet effective approach to detect these differences. The approach is based on tool-supported reviews leveraging lightweight static analysis and machine learning. The approach is evaluated in a case study that analyzes NASAs Operating System Abstraction Layer (OSAL), which is used in various space missions. We detected 84 corner-case issues of which 57 turned out to be bugs that could result in runtime failures if OSAL is used in uncontrolled ways.