20 likes | 140 Views
HW2: A prime path generator (Due Oct 6th 23:59). Input format All nodes are named as 1, 2… Each line contains one edge First line contains a set of initial nodes Second line contains a set of final nodes Ex: 1 2 5 1 3 2 5 3 5 3 6 6 1.
E N D
HW2: A prime path generator (Due Oct 6th 23:59) • Input format • All nodes are named as 1, 2… • Each line contains one edge • First line contains a set of initial nodes • Second line contains a set of final nodes • Ex: 1 2 5 1 3 2 5 3 5 3 6 6 1 • Write a program that will compute all prime paths in a graph, then derive test paths to tour the prime paths in C (say prime_path.c) • You will apply various analysis tools to prime_path.c.So, complex statements are not recommended • No dynamic memory allocation • No pointer arithmetic and minimal pointer operations • You have to write down the program in a modular fashion, so that you can analyze prime_path.cunit by unit 1 2 2 5 1 3 6 1 3 6 1 3 6 1 3 5 6 1 3 6 3 6 5
Draw control flow graphs of your modules in prime_path.c • Generate all prime paths of the modules in prime_path.c • Create test paths to tour all the prime paths of the modules • Create test cases to execute the test paths at Step 4 - sidetrip/detour might be ok, if you cannot find test cases to tour all the prime paths • Also, report the statement and branch coverage by using gcov Note. Submit both hardcopy and softcopy to the TA ( vita500@gmail.com )