[m-rev.] for review: changes to the library from the mode-constraints branch

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Aug 19 18:20:24 AEST 2002


On 19-Aug-2002, Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> On 19-Aug-2002, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > Zoltan Somogyi <zs at cs.mu.OZ.AU> wrote:
> > > +% 	term__var_supply_max_var(VarSupply):
> > > +%		returns the highest numbered variable returned from this
> > > +%		var_supply.
> > 
> > What does "highest numbered" mean?
> > 
> > Is that the maximum in the ordering specified by compare/3,
> > or the highest value returned by term__var_to_int?
> 
> The latter. I don't see how one could read the above text to mean the former.

Well, the wording does seem to suggest the latter, but it is not explicit
about it, so it is not entirely clear.  A reason to doubt that it means
that latter is that I don't see how the latter would be useful, given
that term__var_to_int explicitly leaves the integer values unspecified.

> > What's the purpose of providing this interface?
> 
> It provides information that the mode constraint system can use to batch up
> some ROBDD operations, making them much more efficient.

Is the code in the mode constraint system relying on the value returned
being the maximum in the ordering specified by compare/3?
Or relying on the values returned by term__var_to_int being
sequential integers?

> I could put these predicates in the undocumented part of the interface,
> if you like.

I think that might be a good idea, at least until there is at least one
or two other piece of codes which would benefit from having them.

The term__var_to_int procedure exposes some implementation details,
and var_supply_max_var exposes even more.  I'd rather not do that
unless the need for it is compelling.  Currently the only rationale
for them is that they're using in the mode constraint system, and
I'm not yet convinced that the mode constraint system is not depending
on other unspecified properties of term__var_to_int or compare/3 on vars.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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