定时自动机测试技术解析
1. 整体测试用例生成算法
整体测试用例生成算法旨在根据 ERA 规范生成完整的定时 Hennessy 属性覆盖集。以下是具体的算法步骤:
Algorithm 12 Overall Test Case Generation
input: ERA specification Spec
output: A complete cover set of timed Hennessy properties
1. Compute Specp = Equivalence Class Graph(Spec)
2. Compute Specr = Reachability Graph(Specp)
3. Label every [S ′, z/p] ∈Specr with the sets M , C, R
4. Tested := ∅
5. foreach [S ′, z/p] ∈Specr
// traverse Specr
6. if ¬ ∃z ′ : [S ′, z ′/p] ∈Tested then
7. Tested := Tested ∪{[S ′, z/p]} // enumerate tests
8. Choose ⟨s, ν⟩∈[S ′, z/p]
9. Compute a concrete timed trace σ from ⟨s0, 0⟩to ⟨s, ν⟩
10. Make Test Cases:
11. if A ∈M ([S ′, p]) then after σ must A, is a relevant test
12.