Are there any tools, libraries, or frameworks to get the control flow graph of a C program, and find the worst possible path a program can take?
When I read the other questions related to control flow graphs, I came across a few tools which can generate the control flow graph. Is there any way to use them to find the worst possible path?
If the graph will ever have loops in it, then no -- there isn't a foolproof way to figure this, as the question is equivalent to the halting problem. Short version: it's impossible for a program, given an arbitrary other program, to even determine whether it will ever return. You could possibly determine potential infinite loops, but the only way to be anywhere near certain is to actually run the program with an exhaustive set of inputs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With