On Tue, 7 May 2002 00:05:25 +1000, Fergus Henderson <[EMAIL PROTECTED]> wrote:

>Since the CLR lacks any direct support for Prolog-style backtracking,
>logic programming language implementations for the CLR need to emulate
>it somehow.  The best way to do this, IMHO, is to generate code that
>uses a continuation-passing style, as explained in the two papers that
>I posted references to earlier.  In particular, this means using the
>CLR's exception-handling support to implement commits ("cuts", in Prolog
>terminology).  Commits are not exceptional, and may occur with reasonably
>high frequency for certain styles of logic programming.
>
>If you know of an efficient way to implement Prolog-style backtracking
>and commits on the CLR, without using exception handling, then I would
>very much like to know about it.
>
>If you do not, then I hope you would concede that the design of a
>virtual machine which aims to efficiently support a wide variety
>of languages should not ignore the efficiency of throwing exceptions.
>
>--
>Fergus Henderson <[EMAIL PROTECTED]>  |  "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.

Thank you for your input. This sounds like a well reasoned argument -
exactly the type I was hoping for in fact - and I have to admit my
ignorance in the matter. However, I will take a look at the papers you
mention and try to see how an implementation might work w/ CLR and whether
it seems to require continuation as provided by the CLR.

I 100% agree that a language construct such as the one you describe is the
perfect argument for adding what would otherwise seem (IMHO) an overly
intrusive feature.

Thanks again

Cristian

Reply via email to