dialyzer; non-existing functions in other modules

Kostis Sagonas kostis@REDACTED
Sat May 14 11:49:36 CEST 2005

Matthias Kretschmer asked:
 > I was just wondering, why Dialyzer doesn't report unexported/missing
 > functions if used by another module.
 > ... [example skipped] ...
 > I would expect that dialyzer tells me that test:test/1 isn't defined or
 > exported, but the run passes silently.

Currently, Dialyzer has no 'closed-world' mode.  It accepts a set of
modules and finds discrepancies in them but makes no assumptions that
the set of functions it dialyzes is a complete application (or even
that each module is complete on its own, for that matter). Therefore,
it does not do what you ask.

Tobias and I have discussed about adding such a `closed-world' mode to
Dialyzer, which indeed will be useful because it will allow for more
discrepancies to be identified, but it is not very high on our TODO
list because we are working on extending Dialyzer's functionality in
more exciting ways.

Among the reasons why what you want is not very high on our TODO list
is because Erlang/OTP already provides ways of achieving what you want:
take a look at 'xref'.  (And duplicating functionality which is already
available is not among Dialyzer's top priorities.)


More information about the erlang-questions mailing list