Abstract
We describe a framework for model-based analysis and test case generation in the context of a heterogeneous model-based development paradigm that uses and combines MathWorks and UML 2.0 models and the associated code generation tools. This paradigm poses novel challenges to analysis and test case generation that, to the best of our knowledge, have not been addressed before. The framework is based on a common intermediate representation for different modeling formalisms and leverages and extends model checking and symbolic execution tools for model analysis and test case generation, respectively. We discuss the application of our framework to software models for a NASA flight mission.
Introduction
Modern flight software development increasingly relies on heterogeneous modeling environments. Engineers typically use MathWorks Simulink for control-intensive subsystems and UML statecharts for complex mission logic. While this "best-of-breed" approach optimizes individual component design, it creates significant verification gaps. Existing tools often fail to analyze interactions between disparate model types, and the transition from high-level design to auto-generated C/C++ code can introduce subtle logic flaws or implementation errors, such as integer overflows, that manual testing might overlook. In safety-critical systems like NASA’s Orion spacecraft, these blind spots pose unacceptable risks.
The Verification Framework
To address these challenges, researchers from NASA Ames and Vanderbilt University developed a unified framework for automated analysis and test generation. The core of this approach is a "neutral" environment that bridges the gap between different modeling formalisms.
The framework operates through three primary stages:
- Model Transformation: Using Model-Integrated Computing (MIC) techniques, Simulink, Stateflow, and UML models are translated into a safe subset of Java. This serves as a common intermediate representation.
- Explicit-State Model Checking: The framework utilizes Java PathFinder (JPF) to explore all reachable states of the program. This exhaustive search identifies deadlocks, race conditions, and violations of specific "flight rules" or assertions.
- Symbolic Execution: Symbolic PathFinder (SPF) is employed for automated test generation. By treating inputs as symbolic variables rather than concrete values, SPF builds mathematical "path conditions" for every possible execution branch. A constraint solver then determines the specific input values required to achieve 100% path coverage.
Application to NASA Flight Software
The framework was evaluated using mission-critical components from NASA's Orion space capsule and ARES rocket, including the Launch Abort System (LAS) and Guidance, Navigation, and Control (GN&C) subsystems. These models are highly complex, often comprising tens of thousands of Simulink blocks and over a hundred Stateflow diagrams.
The analysis successfully identified critical issues that standard simulations missed. For instance, the tool discovered "dead code"—unreachable statements in auto-generated C code—which often signals logic errors or code generator flaws. It also pinpointed "missing reset" problems where error counters would increment indefinitely, eventually leading to integer overflows and system crashes during long-duration missions.
Results and Future Directions
The framework demonstrated significant automation capabilities, generating test cases for complex Simulink models that achieved 95% code coverage with minimal manual intervention. It also proved scalable enough to handle recursive calls and complex data structures that commercial tools often struggle to process.
However, challenges remain. Like all model checkers, JPF is susceptible to "state space explosion" when dealing with unbounded variables. Future work involves refining the "connectors" that define communication policies between different modeling formalisms and improving tool robustness for complex mathematical libraries through the use of "native peers" for the constraint solver. Despite these limitations, the framework provides a powerful path toward more reliable, formally verified flight software.
Summary updated