The ACPATH Metric: Precise Estimation of the Number of Acyclic Paths in C-like Languages
Roberto Bagnara, Abramo Bagnara, Alessandro Benedetti, Patricia M., Hill

TL;DR
This paper introduces the ACPATH metric, a new method for accurately estimating the number of acyclic execution paths in C-like programs, addressing limitations of previous metrics like NPATH.
Contribution
The paper defines ACPATH, a novel metric that provides precise estimates of acyclic paths in certain C-like functions and is computationally efficient.
Findings
ACPATH accurately estimates acyclic paths in functions without backward gotos.
The estimation is exact for functions without certain jump statements.
Counting acyclic paths in general is computationally infeasible.
Abstract
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.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Testing and Debugging Techniques · Software Engineering Research · Advanced Malware Detection Techniques
