Research Article
Formal Specification Based Automatic Test Generation for Embedded Network Systems
Algorithm 2
Our algorithm of test case generation.
Data: A SENS specification | Result: A Set of test cases | () begin | () Translate the given SENS specification to a logical formula in conjunctive normal form (CNF) | based on translation rules in Appendix C; | () Input to a SAT solver; | () if is satisfiable then | () The SAT solver outputs a solution (value assignment) corresponding to one test case; | () Add the solution to a set of solutions; | () Let and return Step 2 to search for another solution; | () else | () The SAT solver declares is unsatisfiable; | () Then there are no more solutions; | () Translate previous solutions to test cases and stop; | () return The set of test cases; |
|