Graph Coverage学习笔记
Simple Path & Prime Path & Prime Path Coverage
1,如果要理解prime path,首先要引入简单路径
simple path:
A path from node ni to nj is simple if no node appears more than once, except possibly the first and last nodes are the same.
从定义可知:①简单路径中没有内部环;②环路是简单路径。
2,此时,我们再看主路径的定义
Prime Path : A simple path that does not appear as a proper subpath of any other simple path。
即,主路径(基路径)要满足两个条件:
①是一条简单路径;
②它不能是其他简单路径的子路径;(即不能被比它长的简单路径所包含)
直接上例子:
3,接着我们引出主路径覆盖的定义
Prime Path Coverage(PPC):TR contains each prime path in G.
A simple, elegant and finite criterion that requires loops to be executed as well as skipped.
可以看出,PPC会覆盖长度为0,1及以上的路径;所以,PPC包含点覆盖,边覆盖!
PPC almost, but not quite, subsumes EPC…
但是,PPC不包含EPC(边対覆盖);(由简单路径的特点——非端节点不能出现两次及以上 决定)
e.g:
If a node n has an edge to itself, EPC will require [n, n, m]
[n, n, m] is not prime.