Prolog goals order
- From: "Mauro DiNuzzo" <picorna@xxxxxxxxx>
- Date: Wed, 16 Aug 2006 18:45:30 +0200
Hi All!
I wish to submit an issue to the newsgroup. Perhaps it is old and not all
would be intereseted in.
However, it deals with the order of the goals in a clause. I will consider
mathematics for simplicity, but I think it could be applied whereever.
Prolog system reads goals in sequence (of course), also when it attempts to
solve a set of goals. The only way to achieve the maximum knowledge over the
given set of goals is to delay some of them. This is what happens by means
of attributed variables.
As an example, the goal:
?- X+1>10, read(X).
raises an instantiation error. (we have the mind full of examples like
this!)
My question is: "why Prolog does not change itself to overcome this
problem?". For who is interested, I wrote a 30-lines Prolog source code that
attempt to do it. You can download it at
http://www.prologonlinereference.org/archives/freeze.zip
Feel free to modify it and to discuss here.
Thank you.
/\/\
.
- Follow-Ups:
- Re: Prolog goals order
- From: bart demoen
- Re: Prolog goals order
- From: Greg Buchholz
- Re: Prolog goals order
- From: Peter Wing Larsen
- Re: Prolog goals order
- Prev by Date: Re: ASSERT in SWI Prolog
- Next by Date: comp.lang.prolog Frequently Asked Questions
- Previous by thread: ASSERT in SWI Prolog
- Next by thread: Re: Prolog goals order
- Index(es):
Relevant Pages
|