Eric,
Thank you for those thoughts. To be clear, each activity is
not a vertex. A "block" of activities with no control structure is a
single vertex for the purposes of calculating cyclomatic complexity.
Flows into and out of such a block are edges. The intent is to count
each "path" through the diagram.
Forks and joins designate parallel paths, so I am thinking that a
fork/join should be treated as a single control structure. I think
this means that each flow out of a fork would count as one edge, each
parallel block of activities before the join counts as one vertex, and
each flow into a join would count as one.
Here is an example, which considers a fork/join structure in
isolation, ignoring for the moment the larger diagram structure): For
a simple fork to two simple activities that are then joined, the
complexity would be 4 - 2 = 2 paths. This makes sense to me.
For 3 activities that fork and are then joined, there would be 6 -
3 = 3 paths. When the structure between the fork and the join are
simply activities, it will always be equal to the number of vertices
(blocks of activities), since there are twice as many edges as
vertices.
I think this is sort of where you were headed.
Thanks, Alan
> >
http://groups.google.com/group/sysmlforum?hl=en_US?hl=en- Hide quoted text -
>
> - Show quoted text -