Overview
In the provided case study on model-based test-program generation for a microprocessor, state-space explosion appears as the rapid growth of generated cases when the test-generation process case-splits over many instruction variants across increasing sequence lengths. The assembly language in the study has 56 variants, and sequences of length 3 can lead to 56 + 56^2 + 56^3 = 178808 cases at one point in the process. [C1]
Where it arises
The study contrasts unit tests and sequence tests. Unit tests impose stronger assumptions on testability because the test driver is assumed to have access to registers and memory. Sequence tests rely on observed test behavior and therefore make weaker assumptions about direct state control, but they are more vulnerable to state-space explosion. [C2]
The problem is especially visible when case-splitting over an instruction language with many variants. As sequence length grows, combinations of instruction choices grow quickly, making unrestricted sequence generation impractical in the reported setting. [C1]
Mitigation in the case study
The authors report two mitigation mechanisms:
- Heuristic adaptations at the tactic level.
- Constraints at the level of test purposes, used to restrict the generated sequences with respect to state-space explosion. [C3]
One example constraint, list_all is_logic ι, reduces the relevant sequence space from 56 + 56^2 + 56^3 cases to 7 + 7^2 + 7^3, which the authors describe as a manageable size. [C3]
Practical effects on test generation and execution
The load-and-store sequence scenario reported in the study took 39 seconds in the test-partitioning phase and 42 seconds in the test-data-selection phase on a Powerbook with a 2.8 GHz Intel Core 2 Duo. It generated 1170 subgoals, with about one third being explicit test hypotheses and two thirds being actual test cases. Other reported scenarios took between two and twenty seconds for the whole process. [C4]
The study also reports that the executable model compiled in less than a second, while full test-driver compilation depended strongly on the size of the generated tests. By restraining individual scenarios to about 1000 test cases through test purposes, compilation of a test remained below 3 seconds. [C5]
Related modeling issue
The same case study also notes that the modeled machine uses linear memory represented as a total, infinite function from natural numbers to memory cells. Because direct comparison of such memory states is not practical for testing conformance, memory comparisons had to be weakened to finitized conformance relations. [C6]