[erlang-questions] compile transforms which change the module name

Vlad Dumitrescu vladdu55@REDACTED
Fri Jul 10 12:52:45 CEST 2009


On Fri, Jul 10, 2009 at 12:36, Joe Armstrong<erlang@REDACTED> wrote:
> I am making a very nice transform.
> Hint: take all files in an application call these {x1.erl, x2.erl ...}
> 1) Make a name map
> 2) transform all code in x1.erl x2.erl replacing the module names x1,
> x2 ... etc.
>    with the MD5 sums so x1:abc(...) becomes m273...:abc( ...)
> 3) replace apply(M,F,A) with newapply(map(),M, F, A)

Hi Joe,

Looks nice, but I have a few followup questions:

- where will the map() function reside?
- what about M:F() calls and M:F/A references sent as data?
- updating a comment will invalidate the map...
- it would be nice to have tools to do the reverse transformation for
logs and error messages; also, to be able to find the right version of
a module in ClearCase or SVN given the name and a MD5 hash.

best regards,
Vlad


More information about the erlang-questions mailing list