[mercury-users] Still confused, but getting clearer

Kral Stefan skral at mips.complang.tuwien.ac.at
Tue Nov 30 00:15:52 AEDT 2004


Thanks to all of you for your answers.

I feel I'm getting clearer about all of this. My main problem
is actually letting go some of my preconceived ideas -- to 
some extent I am experiencing some kind of a flash-back to
the time I had my first contact with Prolog.

On Mon, 29 Nov 2004, Fergus Henderson wrote:
> On 27-Nov-2004, Kral Stefan <skral at mips.complang.tuwien.ac.at> wrote:
> > I want to write a committed-choice term rewriting system [...]
> Yes, you should be able to use Mercury's committed choice 
> nondeterminism features to do that.

> > > [...]
> > > Ahh, it sounds as though what you want is user-defined equality.
> > That sounds very good, and like a lot of work. [...]
> Defining equality over sequences of instructions is indeed a 
> hard problem; if the instruction set is Turing-complete, then
> it is undecidable.
The instruction set only comprises basic arithmetic operations for
the calculation of effective addresses. It is a simple DAG 
description, hence not even close to being Turing-complete.

> However, you don't need to actually implement the equality predicate.
> It is enough to just declare that the type has a user-defined equality.
> Rather than implementing it, you can define it using a stub that just
> throws an exception, e.g. [...]
That is exactly what I wanted when I asked my first question about
promise_only_solution. However, I feel now that other methods may
better suit my problem anyway.

> > My applications usually look something like this: [...]
> > Do I have to fundamentally restructure my application to do this
> > in Mercury?
> If I understand your application description correctly, no.
> It could be as simple as [...]
I really like it -- how could I not ?-)

Can't wait to start my porting of my app from yap-4.4.4 to Mercury.
I will need a few more days to complete it first in Prolog, test it,
and then get right into the porting fun...

Of course, I will keep a detailed record about this experience
(I love the "innocence" of "1st time"s) -- and maybe share it,
if it doesn't get too intimate :-)

Best Regards,

Stefan Kral			http://www.complang.tuwien.ac.at/skral

mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe

More information about the users mailing list