Re: How to solve a problem with an infinite loop [beginners question]
- From: Chip Eastham <hardmath@xxxxxxxxx>
- Date: Tue, 09 Oct 2007 15:24:00 -0000
On Oct 8, 6:08 am, philipp.str...@xxxxxxxxx wrote:
thank you very much for your answers.[snip]
What is the theoretical (complexity) reason that this behavior is not
implemented by Prolog itself?
Someone answered my post via E-Mail, informing me about a Prolog
system called xsb (http://xsb.sf.net) that has exactly this feature
(Thanks).
Best wishes to everybody
Philipp
As Neng-Fa Zhou mentions below, there is an extension to
Prolog's resolution procedure called tabled resolution.
The basic idea is not to try reproving "facts" that are
already once proven. The transitive closure/connectivity
problem is an often used illustration of the need for an
extension of this kind, see for example:
[Programming in Tabled Prolog (very) Draft]
http://www.cs.sunysb.edu/~warren/xsbbook/book.html
Of course it makes sense to allow for Prolog to operate
without such universal restriction as never reproving
the same goal twice, because many "hacks" like the
repeat predicate would then no longer "work".
regards, chip
.
- References:
- How to solve a problem with an infinite loop [beginners question]
- From: philipp . strack
- Re: How to solve a problem with an infinite loop [beginners question]
- From: Chip Eastham
- Re: How to solve a problem with an infinite loop [beginners question]
- From: philipp . strack
- How to solve a problem with an infinite loop [beginners question]
- Prev by Date: Re: Planner, micro-planner, etc.
- Next by Date: Re: Interpreter loop - best approach in Prolog?
- Previous by thread: Re: How to solve a problem with an infinite loop [beginners question]
- Next by thread: Re: How to solve a problem with an infinite loop [beginners question]
- Index(es):