Dialyzer: report call to undefined function

Ulf Wiger (AL/EAB) <>
Fri May 19 09:14:31 CEST 2006

Vlad Dumitrescu wrote:
> I think it would be useful if Dialyzer would also report 
> calls to undefined or unexported functions. I often spell 
> names wrong :-)

Agreed. Our local patched version of Dialyzer does this.

I think the initial assumption was that there are other 
tools that do this for you, but we felt that since Dialyzer
has the information, it might as well present it.

> [Aside] How difficult would it be to make Dialyzer work
> incrementally?

Difficult - alas.
We played with this quite a lot, since we have lots and lots
of erlang code in a fairly slow version control system.
Running Dialyzer on the ClearCase repository took about an 
hour per subsystem...

What we did was to prune the PLT, removing all modules 
that depended on the ones being analysed.

But the approach that finally became useful was to incorporate
Dialyzer in our simulated environment, and running it on all
code currently loaded (we use -embedded code loading). This,
together with some optimizations in the call graph etc., 
brought the time for a full system analysis down to 3 minutes
(running in the background). Fredrik Svahn, one of our 
section managers, did some really good work there.

> I mean that it should be possible to build the internal 
> tables by adding and removing modules from them, without 
> having to reread everything else. The analysis needs a global 
> approach, but for a large project, reading the files takes 
> the large chunk of the time.

There are some pitfalls, though, and there is also the risk
that incremental analysis will give a false sense of security.

/Ulf (speaking as one who spent significant time trying to 
muscle in incremental analysis into Dialyzer. ;-)

More information about the erlang-questions mailing list