[m-rev.] for review: dependency tracking

Mark Brown dougl at cs.mu.OZ.AU
Mon Apr 22 04:23:11 AEST 2002


On 21-Apr-2002, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> On 21-Apr-2002, Mark Brown <dougl at cs.mu.OZ.AU> wrote:
> > I disagree with this part of the change, and I think you should undo it.
> > The names were following a consistent pattern: the type variables
> > constrained by the typeclass mercury_edt/2 were always named S and T, and
> > the type variables constrained by the typeclass annotated_trace/2 (which is
> > a lower level representation of the same data) were always named S and R.
> 
> So which type variable should the declaration of subterm_origin use? It is
> sometimes constrained by mercury_edt and sometimes by annotated_trace.
> 

It should use T.  It is not constrained by annotated_trace anywhere that I
can see, not even in the code that you introduce in this change; if it was,
that would be a bug.  The closest thing to what you describe is code like
the following:

	... subterm_origin(edt_node(R)) ... <= annotated_trace(S, R).

but in this case, the presence of edt_node/1 makes all the difference.
Intuitively, the type variables have the relationship T = edt_node(R),
which makes a lot of sense given the instance declaration:

	:- instance mercury_edt(wrap(S), edt_node(R)) <= annotated_trace(S, R)
		...

Cheers,
Mark.

--------------------------------------------------------------------------
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