Debugger-Based State Machine Learning for Embedded Program Testing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Testing embedded system programs is challenging due to state-dependent errors that are difficult to identify and require reliable, state-dependent testing methods, especially when the system is a black box with limited hardware breakpoints and watchpoints, and existing emulator-based approaches are platform-specific and complex.
Innovation Solution
A debugger-controlled state machine learning method that uses a host computer system to execute the program multiple times, detect new program sections, determine the inputs causing these sections, and add them to the learning algorithm's alphabet, without requiring instrumentation or emulation, allowing for state machine estimation and coverage information determination.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If emulator-based instrumentation is used to test embedded systems, then testing capability is improved, but device complexity and platform-specific requirements increase
Solution Approach 1:
The patent applies universality by using a debugger interface that is widely available across different embedded platforms rather than platform-specific emulation tools. The debugger can attach to any embedded system with standard debugging support, making the state machine learning approach universally applicable without requiring platform-specific instrumentation or emulation environments.
Solution Approach 2:
The patent uses copying by creating a state machine model that replicates the behavior of the embedded system under test. Instead of using complex emulation to copy the hardware environment, the approach copies the system's behavioral characteristics through observation and learning, storing the state machine model on the host system for subsequent testing.
2Measurement precision
If code instrumentation is used to learn state machines, then state coverage is improved, but manufacturing precision and binary size increase
Solution Approach 1:
The patent applies taking out by extracting the state machine learning functionality from the embedded system's binary code and relocating it to the host system. The debugger collects execution trace information and state transitions during program execution, then constructs the state machine model externally without requiring any instrumentation code to be embedded in the target program.
Solution Approach 2:
The patent uses an intermediary approach by introducing the debugger as a mediator between the embedded system and the state machine learning process. The debugger intercepts execution traces and state information during program runs, translating these observations into state machine model data without modifying the original program code or requiring direct instrumentation.
3Difficulty of detecting and measuring
If hardware breakpoints and watchpoints are increased to improve testing, then detection capability is improved, but device complexity and hardware requirements increase
Solution Approach 1:
The patent applies partial action by using a limited number of hardware breakpoints and watchpoints strategically placed in the program, rather than attempting to monitor all possible execution points. The state machine learning algorithm processes the partial execution trace information collected from these limited observation points to reconstruct the complete state machine model.
Data Source
AI summary
A method for learning a state machine for a program including executing, via a host computer system, a state machine learning algorithm, wherein the host computer system controls an embedded system via a debugging interface by means of a debugger such that it executes the program several times. The host computer system detects for each execution of the program whether a program section has been reached which has not yet been reached during the previous executions of the program; and, when it detects this, an input to the program which was not supplied to the program by the host computer system and which caused the program to reach the program section, by using the debugger to determine a memory area of the embedded system into which the input was written, reading it out, and adding the determined input to an alphabet.


