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

Olivier BOUDEVILLE olivier.boudeville@REDACTED
Tue Aug 30 15:32:45 CEST 2011

Hi Kostis,

As for me I tend to prefer building everything at once, on a purely 
brute-force automated way, so that the same exact test-proofed process 
always applies (from one version to another, from a developer to another). 
What we are doing currently is generating "incremental" PLT for each level 
of our software stack (starting from Erlang of course). It seems to work 

As our codebase, despite being small, had already too many files to be 
updated with appropriate type specs in one shot, we used an escript which 
instrumented first the existing source code with specs *as they were 
deduced by Dialyzer*. Then only, as time permits, we will fine-tune, file 
by file, the specs according to the developer's original intent rather 
than according to what Dialyzer inferred (which allows to have some 
insights and save some time).

Later we will have to see how type spec information can be injected in 
BEAMs whose generation involved functions being defined thanks to a 
parse-transform. Not for today though!

Best regards,

Olivier Boudeville

EDF R&D : 1, avenue du Général de Gaulle, 92140 Clamart, France
Département SINETICS, groupe ASICS (I2A), bureau B-226
Office : +33 1 47 65 59 58 / Mobile : +33 6 16 83 37 22 / Fax : +33 1 47 
65 27 13

Envoyé par : erlang-questions-bounces@REDACTED
30/08/2011 14:21


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

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 
> Unknown functions:
> wxWindows:'Destroy'/1
> wx_core:quit/0
> Unknown types:
> gen_sctp:assoc_id/0
> gen_sctp:sctp_socket/0
erlang-questions mailing list

Ce message et toutes les pièces jointes (ci-après le 'Message') sont établis à l'intention exclusive des destinataires et les informations qui y figurent sont strictement confidentielles. Toute utilisation de ce Message non conforme à sa destination, toute diffusion ou toute publication totale ou partielle, est interdite sauf autorisation expresse.

Si vous n'êtes pas le destinataire de ce Message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez reçu ce Message par erreur, merci de le supprimer de votre système, ainsi que toutes ses copies, et de n'en garder aucune trace sur quelque support que ce soit. Nous vous remercions également d'en avertir immédiatement l'expéditeur par retour du message.

Il est impossible de garantir que les communications par messagerie électronique arrivent en temps utile, sont sécurisées ou dénuées de toute erreur ou virus.

This message and any attachments (the 'Message') are intended solely for the addressees. The information contained in this Message is confidential. Any use of information contained in this Message not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval.

If you are not the addressee, you may not copy, forward, disclose or use any part of it. If you have received this message in error, please delete it and all copies from your system and notify the sender immediately by return message.

E-mail communication cannot be guaranteed to be timely secure, error or virus-free.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20110830/2cb66dd1/attachment.htm>

More information about the erlang-questions mailing list