[erlang-questions] program to analyse function usage
Thu Jun 18 17:19:34 CEST 2015
> I'd like to analyse a very large set of Erlang programs to see
> which functions in the standard libraries actually get used.
The definition of "actually get used" is a tricky one. If my
code references a function (directly or indirectly), but only
calls it in very unusual circumstances, is that of interest?
Incidentally, this question brings to mind the notion of "tree
shaking", as performed by Google's Closure compiler:
The ClojureScript folks use this to eliminate functions from
their generated code sets. It might be that a similar approach
could be used to optimize the loading of Erlang functions.
> Does anybody have a large collection of erlang modules?
I don't have much to offer except for this tiny list, but I'd
be very interested in knowing about what you find:
Given that disk is basically free in the amounts you'll need, it
might be worthwhile to think about setting up the collection as
a long-term community resource for assorted analytic efforts.
> Failing this I guess I could scrape code from github - is there
> any way to programmatically fetch all erlang modules from github?
I'm pretty sure that there's no single command that would pull
down all of the Erlang modules from GitHub, but there's a REST
API that would let you assemble a list of prospects, download
> also are there some download limits that I need to be
> aware of - I don't want to get barred from github :-)
Once you have scaled the problem (i.e., assembled a pick list
with size statistics), you might want to contact them with
a detailed question. Even if it doesn't get a useful response,
you'll have given them fair warning...
http://www.cfcl.com/rdm Rich Morin rdm@REDACTED
http://www.cfcl.com/rdm/resume San Bruno, CA, USA +1 650-873-7841
Software system design, development, and documentation
More information about the erlang-questions