[m-dev.] [HAL-dev] Adding Herbrand types to Mercury (fwd)
Fergus Henderson
fjh at cs.mu.OZ.AU
Wed Dec 17 13:42:57 AEDT 2003
Ralph Becket <rafe at cs.mu.OZ.AU> wrote:
> :- solver type t
> ---> '$'(herbrand_var(t))
> ; f
> ; g(t)
> where equality is unify_t.
>
> where herbrand_var/1 is a private builtin type that might look like
> this:
>
> :- type herbrand_var(T)
> ---> free
> ; bound(T).
With the current Mercury implementation, this would be suboptimal
efficiency-wise, because there are two levels of indirection for each
level of binding, one for '$'/1, and one for bound/1.
Something like this instead
:- solver type t
---> '$free'
; '$bound'(t)
; f
; g(t)
where equality is unify_t.
could be considerably more efficient.
--
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