[erlang-questions] Dialyzer programmatic interface and output_plt

Tobias Lindahl <>
Fri May 9 17:00:24 CEST 2008


Eric,

I found the problem. The analysis contains a bunch of files that could 
not be scanned. The errors are returned from the analysis, and when such 
errors occur the output plt is not written.

I think it is a bit inconsistent to not abort the analysis and then 
refuse to write the plt. It is probably a good idea to simply abort when 
I find that I cannot scan all files.

If you want a patch please tell me. Otherwise, you can assume that if 
there are errors in the return, the plt is not written.

Anyway, thanks for the report.

Tobias


Eric Merritt wrote:
>>  > >
>>  >
>>  >  For me the option {output_plt, File} works. I tested it with the released
>>  > sytem (R12B-2) and it seems to work there too. Is there a small test case
>>  > that you can send me?
>>
>>  I will see if I can put together a simple test case for you. At the
>>  very least I can verify that its not my issue.
>>
>>
> 
> So I have confirmed that with the following options no actual plt file
> is generated though the generation runs without fault. If I use a
> simpler set of options a plt file does result. I am not sure what the
> difference is. It does take over an hour to run on this though.
> (replace <root-dir> and <some-other-dir> with real directories, of
> course).
> 
> Opts = [{files_rec,["<root-dir>/repo/ktuo-0.4.0.1/ebin",
>              "<root-dir>/repo/ewrepo-0.16.6.0/ebin",
>              "<root-dir>/repo/ibrowse-1.4/ebin",
>              "<root-dir>/repo/ewlib-0.7.4.0/ebin",
>              "<root-dir>/repo/eunit-2.0/ebin",
>              "<root-dir>/repo/sgte-0.7.1/ebin",
>              "<root-dir>/repo/mnesia-4.4.2/ebin",
>              "<root-dir>/repo/xmerl-1.1.8/ebin",
>              "<root-dir>/repo/dialyzer-1.8.0/ebin",
>              "<root-dir>/repo/gs-1.5.9/ebin",
>              "<root-dir>/repo/hipe-3.6.6/ebin",
>              "<root-dir>/repo/tools-2.6.1/ebin",
>              "<root-dir>/repo/edoc-0.7.5/ebin",
>              "<root-dir>/repo/compiler-4.5.2/ebin",
>              "<root-dir>/repo/syntax_tools-1.5.4/ebin",
>              "<root-dir>/repo/crary-0.2.0/ebin",
>              "<root-dir>/repo/sasl-2.1.5.2/ebin",
>              "<root-dir>/repo/uri-0.1.0/ebin",
>              "<root-dir>/repo/kernel-2.12.2/ebin",
>              "<root-dir>/repo/stdlib-1.15.2/ebin"]},
>  {from,byte_code},
>  {output_plt,"<some-other-dir>/_build/development/info/dialyzer_plt"}],
> dialyzer:run(Opts).
> 
> 
> However, If i do something trivial like
> 
> Opts = [{files_rec,["<root-dir>/repo/ktuo-0.4.0.1/ebin"]},
>  {from,byte_code},
>  {output_plt,"<some-other-dir>/_build/development/info/dialyzer_plt"}],
> dialyzer:run(Opts).
> 
> A plt file is output as expected.
> 
> I have started going through and trying to see when dialyzer falls
> over but its slow enough that its going to take me awhile.
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions



More information about the erlang-questions mailing list