[m-dev.] Re: [HAL-dev] Adding Herbrand types to Mercury

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Dec 17 13:21:09 AEDT 2003


On 17-Dec-2003, Ralph Becket <rafe at cs.mu.OZ.AU> wrote:
> Fergus Henderson, Wednesday, 17 December 2003:
> > For traditional Prolog alias structures, you'd need something like this:
> > 
> > 	:- type herbrand_var(T)
> > 	--->    free
> > 	;       alias(herbrand_var(T))
> > 	;       bound(T).
> 
> It occurred to me that with traditional Prolog alias structures, you
> don't need alias(X) since that's equivalent to bound('$'(X))

OK, that works.

> > No.  In particular, there is no requirement that a solver type value
> > with inst "ground" always be represented by a non-'$' data constructur.
> > For example, the ground value "f" might be represented as '$'(bound(f))'.
> 
> Could you present a brief statement of what it means for
> - a solver type value to have inst any,

This means that its representation has been initialized.

> - a solver type value to have inst ground,

This means that the value is ground, i.e. it's representation has been
set to something which represents a ground term (a term containing no
variables).

> - a non-solver type value to have inst any, and
> - a non-solver type value to have inst ground.

For non-solver types that do not contain solver types,
those two both mean exactly the same thing: that the value is ground.

For non-solver types that contain solver types, inst `any' / `ground'
means that the top-level functor of the non-solver type is bound, and
the arguments of that functor have inst `any' / `ground' (respectively).
This definition applies recursively.

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