Re: prolog and backtracking (Hans Aberg)
Mon, 24 Sep 2007 18:12:40 GMT

          From comp.compilers

Related articles
prolog and backtracking (James Sison) (2007-09-22)
Re: prolog and backtracking (Markus Triska) (2007-09-24)
Re: prolog and backtracking (2007-09-24)
| List of all articles for this month |

From: (Hans Aberg)
Newsgroups: comp.compilers
Date: Mon, 24 Sep 2007 18:12:40 GMT
Organization: Virgo Supercluster
References: 07-09-087
Keywords: prolog
Posted-Date: 24 Sep 2007 14:15:49 EDT

  James Sison <> wrote:

> I'M Trying To Write This Prolog Interpreter For A Subset Of The Prolog
> Grammar In Java And I Encountered Problems With Bakctracking.

There is a MiniProlog that comes with the Haskell interpreter Hugs
<>, which is OO, and therefore easy
to translate into languages like C++ and Java. For the Prolog interactive
query style, it relies on laze evaluation, so that goes out of the window
when translated into a strict language. And I recall the cut was wrongly
implemented (but easily fixed).

But you might take a look at that one, to see how this stuff is implemented.

    Hans Aberg

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.