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

Olivier BOUDEVILLE olivier.boudeville@REDACTED
Mon Aug 29 16:58:14 CEST 2011


Hi,

I am using R14B03, and apparently cannot succeed in making good use of 
Dialyzer: I wanted first to generate a PLT for the full Erlang/OTP install 
and then use it against my codebase to perform more accurate checkings.

So I generated a full PLT with a line like:
(this is slightly edited as actually the building of the PLT is already 
integrated into the script we use to streamline our Erlang installations)

${prefix}/bin/dialyzer --build_plt -r ${prefix}/lib/erlang --output_plt 
${prefix}/Erlang-R14B03.plt

The operation seems to succeed and I end up some time later with a 4.4MB 
PLT file.

However if I run it against a random module of us:

 ${prefix}/bin/dialyzer --plt ${prefix}/Erlang-R14B03.plt  --output_plt 
./common.plt  src/utils/basic_utils.beam  --build_plt

It looks as if the previous PLT was not used:

  Creating PLT ./common.plt ...
Unknown functions:
  calendar:datetime_to_gregorian_seconds/1
  calendar:seconds_to_daystime/1
  code:get_object_code/1
  global:register_name/2
  global:unregister_name/1
  global:whereis_name/1
  os:cmd/1
  random:seed/0
  random:seed/3
  random:uniform/0
  random:uniform/1
  rpc:multicall/5
  sets:from_list/1
  sets:to_list/1
  string:tokens/2
  text_utils:string_to_integer/1
  timer:sleep/1
 done in 0m0.58s
done (passed successfully)

Most of these functions come from stdlib and al, so I would expect them to 
be in Erlang-R14B03.plt. 
And if I run, as an example (calendar being among the missing modules):

${prefix}/dialyzer --plt_info --plt ${prefix}/Erlang-R14B03.plt | grep 
calendar

I have:
 "${prefix}/lib/erlang/lib/stdlib-1.17.4/ebin/calendar.beam",

So apparently the two calendar functions should be known of  this PLT.

I must be making some mistake, but I tried different other approaches (ex: 
with '--apps erts kernel stdlib' instead of a wide '-r ') but with no 
luck.

Are the installed BEAMs stripped in some way of debug_info/type specs, or 
anything like that ?

Any help appreciated!

Thanks in advance,
Best regards,

Olivier.
---------------------------
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



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/20110829/e529afb0/attachment.htm>


More information about the erlang-questions mailing list