1

I've read article "NPATH: A MEASURE OF EXECUTION PATH COMPLEXITY AND ITS APPLICATIONS" Nejmeh, Communications of the ACM Feb 1988 pp 188-200, it says nothing about NPath complexity for try-catch-finally statement.

The formula I deduced is

NP(T-C-F) = (NP(try-range) + S(NP(catch)))*NP(finally),
where
NP(finally) = NP(finally-range) or 1, if no finally block range is present,
and
NP(catch) = NP(catch-range)
(Here is an interesting side question if java multicatch should be counted as catch with multiple branches with NP(catch-expr) added to its complexity.)

My knowledge of subject field of CS is quite low, so I am not sure is my formula is correct or if the concept of NPath complexity is applicable to exception handling code.

Cettt
  • 11,460
  • 7
  • 35
  • 58
atta trol
  • 11
  • 1
  • 2
    This isn't programming, this is CS theory, and should be on http://cs.stackexchange.com/ – Marc B Jul 31 '15 at 21:40
  • 1
    This is the description they put for the article :"Software engineering is a discipline in search of objective measures for factors that contribute to software quality. NPATH, which counts the acyclic execution paths through a function, is an objective measure of software complexity related to the ease with which software can be comprehensively tested." , so i don't think this is just about CS theory. – Gherbi Hicham Aug 03 '15 at 09:19
  • I'm voting to close this question as off-topic because this is CS theory, and should be on cs.stackexchange.com – Cettt May 08 '19 at 06:37

0 Answers0