[erlang-questions] Multiple dialyzer PLTs?
Fri Jan 23 09:04:30 CET 2009
Michael Radford wrote:
> Kostis Sagonas writes:
>> Michael Radford wrote:
>>> I'm wondering how difficult (or even possible) it would be for dialyzer
>>> to support either reading multiple PLT files at startup, or a way to
>>> merge multiple PLT files that were produced separately.
>> Reading multiple PLT files at startup and merging the information in
>> them is possible, but the end result is not as good as you would expect
>> it to be whenever there are dependencies between functions in the
>> different PLTs. To do a good job one needs to essentially re-analyze
>> the code of these functions/modules.
> That's pretty much what I figured; but even an incomplete analysis that
> included other libraries would be an improvement over our current
> situation where we ignore them.
> Of course I understand that from a correctness standpoint, it would be
> even better to analyze the entire codebase together. But with many
> libraries that are constantly being upgraded, I don't think it will fly
> to require all the developers to wait for dialyzer to run after every
> package installation.
> Could you offer any pointers on where to start if I were to try to
> implement reading multiple PLT files?
Most of the ptl handling is done in dialyzer_plt.erl and it interacts
with dialyzer_cl.erl in order to find out what needs to be reanalyzed.
You might also want to have a look at dialyzer_succ_typings.erl and its
interaction with dialyzer_contract.erl, but start out with the first two
It shouldn't be too hard to make this happen, at least as long as the
plts are non-overlapping, or when the overlapping information is
identical (e.g., the plts was built from the same otp-plt). The main
reason we haven't done this is that it is the points Kostis made about
> Thanks for your help (and for a great tool),
> erlang-questions mailing list
More information about the erlang-questions