[m-rev.] for review: break up simplify.m
Zoltan Somogyi
zoltan.somogyi at runbox.com
Thu Jul 24 11:48:51 AEST 2014
On Thu, 24 Jul 2014 10:47:00 +1000 (EST), Julien Fischer <jfischer at opturion.com> wrote:
> In relation to the format_call module I suggest separating out the
> predicate is_format_call/3 and putting it in one of the common utility
> modules, hlds_code_util for example. It should then be possible to make
> format_call a private submodule of the simplify package, since
> determinism analysis only makes uses of is_format_call/3.
That is not good idea. The reason is that is_format_call relies on the same database
of the properties of format-like calls as the transformation that optimises such calls.
Putting the only copy of this database into e.g. hlds_code_util would introduce unwanted
coupling between hlds_code_util and format_call, while duplicating it would be an obvious
double maintanence problem.
I think putting format_call into the interface part of simplify.m is the best available
compromise. Determinism analysis already has the transformation predicate of
format_call visible to it; this move won't make anything worse in that regard.
Zoltan.
More information about the reviews
mailing list