[m-rev.] for review: add `any_is_bound' pragma
David Overton
dmo at cs.mu.OZ.AU
Thu Jul 24 16:36:09 AEST 2003
On Thu, Jul 24, 2003 at 03:46:24PM +1000, Fergus Henderson wrote:
>
> Also, regarding the comment about `nonvar': I'm quite dubious about
> adding `nonvar' in the future. Given that we have no_tag types,
> and that the `nonvar' value could just be a no_tag wrapper around a solver
> type with inst `any', I don't see how `nonvar' could provide any useful
> information.
Yes, you're right, it's not useful in this situation because it doesn't
give you any more information than `any'.
However, I've been asked to implement it for Mercury because it is
useful for increasing the precision of mode analysis in other
situations. E.g. for herbrand types, HAL provides an impure predicate
:- impure pred nonvar(T) <= solver(T).
It would be useful to be able to give this a mode declarations of
:- mode nonvar(any >> nonvar) is semidet.
(rather than `any >> any'). This can avoid unnecessary tag tests and
dereferences, among other things.
David
--
David Overton Uni of Melbourne +61 3 8344 1354
dmo at cs.mu.oz.au Monash Uni (Clayton) +61 3 9905 5779
http://www.cs.mu.oz.au/~dmo Mobile Phone +61 4 0337 4393
--------------------------------------------------------------------------
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