Re: prolog and backtracking

haberg@math.su.se (Hans Aberg)
Mon, 24 Sep 2007 18:12:40 GMT

          From comp.compilers

Related articles
prolog and backtracking the_evil_trembles@yahoo.com (James Sison) (2007-09-22)
Re: prolog and backtracking triska@logic.at (Markus Triska) (2007-09-24)
Re: prolog and backtracking haberg@math.su.se (2007-09-24)
| List of all articles for this month |

From: haberg@math.su.se (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 <the_evil_trembles@yahoo.com> 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
<http://haskell.org/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.