Re:Dependency Inversion in C Using Function Pointers
by ernstsson on Monday July 09, 2012 @10:33AM
(#4218358)
As previously mentioned in one of the other comments; to "facilitate run-time configuration and testing.". Removing the static coupling has a value in itself, making the component isolated to facilitate unit-testing.
Arqua would have to find out that what value the global gNotifier variable could contain. An exact points-to-analysis should find out that it is clientNotify an insert the dependency. A less-powerful analysis might approximate that it could be anything. In this case there should be a dependency to every other compilation unit. Since Arqua reports "no dependency" it seems to do a non-conservative approximation, which means it does not report safe results.
That is not really a good quality metric. So why should one optimize against it?