[erlang-questions] Dialyzing strategy

Attila Rajmund Nohl attila.r.nohl@REDACTED
Mon Dec 19 13:57:25 CET 2011


Hello!

I have a rather large Erlang product and want to run dialyzer on it.
This product consists of around 100 functional blocks. There is a
dependency between the function blocks and I can't swear there's no
circular dependency between some of the blocks, unfortunately. This
dependency is multi-level, i.e. function block A depends on B which in
turn depends on C, etc. Moreover, some blocks contain multiple modules
with the same name. They are not loaded simultaneously in the runtime
system (or at least the shadowing is designed), but it means that I
can't dialyze the function blocks simply. The other problem is the
size of the product - the 32 bit dialyzer run out of 4 GB memory when
I tried to run it on more than a couple of function blocks
simultaneously. I haven't tried to run dialyzer on the whole product,
I guess that the 16 GB physical memory would be not enough either.

So how shall I run dialyzer on this product? Our currently method is
that I identified a couple of "base" function blocks. The other
function blocks depend on these base blocks and also these base blocks
do not contain duplicated module names. In our nightly tests I first
build one PLT from these all "base" function blocks and also from some
of the OTP applications. Then for each of the remainder function
blocks I build a PLT from the unique modules and from the previously
created "base" PLT. Then finally I dun dialyzer on the duplicated
modules with the PLT created in the previous step. In each nightly
test new PLTs are built.

My problem with this approach is that it takes quite a long time,
around three hours or more. The ideal solution would be to incorporate
dialyzer to our build process. I would like to get the dialyzer
warnings around the same time I get the compilation warnings. Or at
least when the function block is built. Because running dialyzer takes
a lot more time than building code, I'm thinking about having a
separate PLT file for each function block that is rebuild when a new
file is committed into the repository. Then these PLT files could be
used by the individual developers to check their code before
committing.

How would you run dialyzer on this kind of product? How do you run
dialyzer on your product?



More information about the erlang-questions mailing list