[erlang-questions] Dialyzer PLT & unknown Erlang/OTP functions

Kostis Sagonas kostis@REDACTED
Tue Aug 30 14:21:01 CEST 2011

On 08/30/11 12:24, Olivier BOUDEVILLE wrote:
> Hello Stavros,
> Thanks again for your answer; indeed --add_to_plt was the way to go, it
> then worked like a charm.

Hi Olivier,

Let me add to the info that Stavros sent that --add_to_plt is a very 
convenient way to avoid building the PLT for the full Erlang disto in 
one go.  One could start with a PLT for e.g. erts, kernel and stdlib and 
then incrementally add to it when dialyzer reports unknown functions on 
the code base they want to analyze.

Also, note that adding parts of your code base to the PLT is typically 
something to do only when these parts are considered more or less stable 
(because if there are any changes to them, the up-to-date check will 
fail and the PLT will be re-built incrementally) and a "base" upon which 
the rest of the code is build. Adding them to the PLT just allows one to 
avoid having to specify them as part of the files that will be analyzed 
and for which discrepancies will be detected.


PS. As to the following, it is something for the OTP folks to look at:

> On a side note, making the PLT for the full Erlang distro exhibits the
> following remarks:
> """
> eunit_test.erl:242: Call to missing or unexported function
> eunit_test:nonexisting_function/0
> xrc.erl:124: Call to missing or unexported function wxXmlResource:reload/2
> Unknown functions:
> wxWindows:'Destroy'/1
> wx_core:quit/0
> Unknown types:
> gen_sctp:assoc_id/0
> gen_sctp:sctp_socket/0

More information about the erlang-questions mailing list