Re: Prolog goals order



"Jan Wielemaker" <jan@xxxxxxxxxxxxxxxxxxx> wrote in message
news:slrneerhds.t79.jan@xxxxxxxxx
On 2006-08-24, Peter Wing Larsen <peterwing@xxxxxxx> wrote:
"Mauro DiNuzzo" <picorna@xxxxxxxxx> wrote in message
news:ZYHEg.145$%37.109@xxxxxxxxxxxxxxxxxxxxxx
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.
My question is: "why Prolog does not change itself to overcome this
problem?".

This is also something I have thought about as a novice prolog learner.
Is
there any reason why prolog is this way?

I think the answer is that Prolog is not a theorem prover, but a
programming language. If I write write(a), write(b) I want "ab" and
not "ba", so order matters. If the system starts reordering things,
you as a programmer quickly do not feel in control any longer. If
you have two goals and you cannot put them in the right order because
it is depending on the runtime behaviour there are several options.
[snip]

Thanks for the explanation. That makes sense.


.



Relevant Pages

  • Re: Is Prolog good for AI? (was: Minsky still posting)
    ... >> widely viewed as a failure. ... programming language was "a version of Prolog". ...
    (comp.lang.prolog)
  • Algorithm transformation
    ... (sorry if the syntax is prolog like, but it is the programming language ... And the target is to obtain the set of rules for the addition of one ...
    (comp.theory)
  • Re: C# 3.0 with pseudorelational extensions
    ... >> convinced that unifying the capabilities of the dbms and the ... >> general purpose programming language will lead to some great ... > prolog appeared within months of RM, and was based on just that premise. ... >> mostly about throwing out relational functionality and putting ...
    (comp.databases.theory)
  • Re: After Clocksin & Mellish?
    ... When you say "the Prolog programming language" or "the programming language Prolog" ... Is there any real need to speak of "the Prolog programming language" in the singular? ... If as procurement officer I am writing the final specifications ...
    (comp.lang.prolog)
  • Re: compare element in a list prolog
    ... >>for most Prolog newcomers, namely, how, starting with a blank slate, do ... >>of Prolog programming and, as such, only comes from continued practice. ... to designing programs in any programming language, I agree, but AFAIK ... > processing lists. ...
    (comp.lang.prolog)