[m-rev.] for review: untupling transformation

Peter Wang wangp at students.cs.mu.OZ.AU
Tue Feb 1 18:00:32 AEDT 2005


On Tuesday 01 February 2005 05:12 pm, Julien Fischer wrote:
> On Mon, 31 Jan 2005, Peter Wang wrote:
> > +:- pred fix_calls_in_par_conj(hlds_goals::in, hlds_goals::out,
> > +	prog_varset::in, prog_varset::out, vartypes::in, vartypes::out,
> > +	transform_map::in, module_info::in) is det.
> > +
> > +fix_calls_in_par_conj([], [], !VarSet, !VarTypes, _, _).
> > +fix_calls_in_par_conj([Goal0 | Goals0], [Goal | Goals], !VarSet, !VarTypes,
> > +		TransformMap, ModuleInfo) :-
> > +	fix_calls_in_goal(Goal0, Goal, !VarSet, !VarTypes, TransformMap,
> > +		ModuleInfo),
> > +	fix_calls_in_par_conj(Goals0, Goals, !VarSet, !VarTypes, TransformMap,
> > +		ModuleInfo).
> > +
> Add a comment explaining why parallel conjunction is treated differently to
> normal conjunction.

I'm not sure why.  I was reading cse_detection.m (for example) and it seemed
that conjunctions were specifically flattened, whereas parallel conjunctions
were not.

> It might be better to generate this list in reverse and then
> call list.reverse on it.  (Although I don't think it's really going
> to matter for lists of the length you'll typically be dealing with).

Yup.

Peter


--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list