The ACPATH Metric: Precise Estimation of the Number of Acyclic Paths in C-like Languages
Fuente:
arXiv
Saved in:
| Main Authors: | , , , |
|---|---|
| Format: | Preprint |
| Published: |
2016
|
| Subjects: | |
| Online Access: | |
| Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
| _version_ | 1866914708281360384 |
|---|---|
| author | Bagnara, Roberto Bagnara, Abramo Benedetti, Alessandro Hill, Patricia M. |
| author_facet | Bagnara, Roberto Bagnara, Abramo Benedetti, Alessandro Hill, Patricia M. |
| contents | NPATH is a metric introduced by Brian A. Nejmeh in [13] that is aimed at overcoming some important limitations of McCabe's cyclomatic complexity. Despite the fact that the declared NPATH objective is to count the number of acyclic execution paths through a function, the definition given for the C language in [13] fails to do so even for very simple programs. We show that counting the number of acyclic paths in CFG is unfeasible in general. Then we define a new metric for C-like languages, called ACPATH, that allows to quickly compute a very good estimation of the number of acyclic execution paths through the given function. We show that, if the function body does not contain backward gotos and does not contain jumps into a loop from outside the loop, then such estimation is actually exact. |
| format | Preprint |
| id |
arxiv_https___arxiv_org_abs_1610_07914 |
| institution | arXiv |
| publishDate | 2016 |
| record_format | arxiv |
| spellingShingle | The ACPATH Metric: Precise Estimation of the Number of Acyclic Paths in C-like Languages Bagnara, Roberto Bagnara, Abramo Benedetti, Alessandro Hill, Patricia M. Software Engineering Programming Languages 68N30 D.2.8; D.2.5 NPATH is a metric introduced by Brian A. Nejmeh in [13] that is aimed at overcoming some important limitations of McCabe's cyclomatic complexity. Despite the fact that the declared NPATH objective is to count the number of acyclic execution paths through a function, the definition given for the C language in [13] fails to do so even for very simple programs. We show that counting the number of acyclic paths in CFG is unfeasible in general. Then we define a new metric for C-like languages, called ACPATH, that allows to quickly compute a very good estimation of the number of acyclic execution paths through the given function. We show that, if the function body does not contain backward gotos and does not contain jumps into a loop from outside the loop, then such estimation is actually exact. |
| title | The ACPATH Metric: Precise Estimation of the Number of Acyclic Paths in C-like Languages |
| topic | Software Engineering Programming Languages 68N30 D.2.8; D.2.5 |
| url | https://arxiv.org/abs/1610.07914 |