[m-dev.] for review: EDCGs - diff part 1

Fergus Henderson fjh at cs.mu.OZ.AU
Sun Feb 20 02:50:41 AEDT 2000


On 04-Feb-2000, Peter Nicholas MALKIN <pnmalk at students.cs.mu.oz.au> wrote:
> Implementation of the EDCG syntax. The transformation from code with EDCGs to
> code without, is done when items are placed into the HLDS.
...
> compiler/edcg.m:
>         New file. Contains predicates to manipulate the hidden_info, and
>         state_info data structures (the main EDCG data structures).
>         Also contains some predicates to parse EDCG syntax.
>
> compiler/prog_data.m:
>         Added and changed types to deal with hidden declarations.
> 
> compiler/prog_io.m:
>         Added code to parse EDCG `htype' and `hmode' declarations and also code
>         to parse EDCG clauses.
> 
> compiler/prog_io_dcg.m:
>         Trivial changes.
> 
> compiler/prog_io_goal.m:
>         Added code the parse the hidden part to predicate calls.
> 
> compiler/prog_io_typeclass.m:
>         Trivial changes.
> 
> compiler/prog_util.m:
>         Trivial changes.

IMHO you should state the nature of the trivial changes;
e.g. "trivial changes to handle <whatever>".
Otherwise, well, you may think the changes trivial,
but if someone else is scanning through the log messages
looking for a change that could have caused a certain bug,
your log message will not be much help for them; they'll
probably have to examine that change, to see if it really
is trivial, or whether it might have caused the bug they're
looking for.


Something that you should be careful about is modularity,
in particular ensuring (where feasible) that the parse tree
stuff does not depend on the HLDS.
According to our design, code in prog*.m (i.e. the parse tree)
should not depend on code in hlds*.m (i.e. the HLDS).
If one of your modules, e.g. edcg.m, depends on the HLDS,
then you should be careful that your module does not need to be
imported by prog*.m, if necessarily by splitting your into smaller
parts.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list