[erlang-questions] Dialyzer type/spec info question

José Valim <>
Mon Nov 17 17:22:40 CET 2014

We have expressed interest too in reading typespecs from core. If I
remember correctly though, the OTP team did not reach a consensus about
storing Core AST in beam files.

If there is a consensus and a name for a chunk where we can store Core AST
in beam files, I would gladly sent a patch to dialyzer and compiler (so we
have a pass that stores Core AST).

On Monday, November 17, 2014, Robert Virding <> wrote:

> From where does it get it if I have .erl files as input? From the AST as
> well? Do you know if there is any difference in the data itself between the
> AST and core? I am guessing not but want to check. If there is no
> difference then the info could be gotten from Core. This would make it
> easier to use dialyzer together with LFE.
> Robert
> On 17 November 2014 17:03, Stavros Aronis <
> <javascript:_e(%7B%7D,'cvml','');>> wrote:
>> Hi Robert,
>> Dialyzer gets this info from beam_lib:chunks(File, [abstract_code]) which
>> corresponds to the AST and is included in beam files if +debug_info is used
>> while compiling.
>> To my knowledge there is no reason to not let sources be combined (except
>> perhaps when building a PLT), but the implementation seems to require
>> uniformity.
>> Relevant functions:
>> dialyzer_utils:get_abstract_code_from_{src,beam}/{1,2}, get_spec_info/3,
>> get_record_and_type_info/1.
>> Regards,
>> Stavros
>> On Mon, Nov 17, 2014 at 4:53 PM, Robert Virding <
>> <javascript:_e(%7B%7D,'cvml','');>> wrote:
>>> From where does dialyzer get the user added type and spec info? From the
>>> AST, or from Core erlang which contains the same type/spec data? And why?
>>> Can I control it?
>>> An extra question: why doesn't dialyzer allow me to mix input from both
>>> .erl and .beam files? Or does it and I have missed that?
>>> Robert
>>> _______________________________________________
>>> erlang-questions mailing list
>>> <javascript:_e(%7B%7D,'cvml','');>
>>> http://erlang.org/mailman/listinfo/erlang-questions


*José Valim*
Skype: jv.ptec
Founder and Lead Developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20141117/c5029f50/attachment.html>

More information about the erlang-questions mailing list