Re: Prolog goals order




Mauro DiNuzzo wrote:
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?".

FWIW, I think the Mercury langauge does exactly that. From
http://doc.rz.ifi.lmu.de/programming/mercury/transition_guide.html

"the Mercury compiler automatically reorders conjunctions so that all
consumers of a variable come after the producer"

Greg Buchholz

.



Relevant Pages

  • Re: Problem with SWI Prolog
    ... I did have in mind both the closed-world assumption, and that Prolog ... clauses are better viewed inductively vice dedeuctively. ...
    (comp.lang.prolog)
  • Re: Submitting to Baen
    ... >> where I might vote for it is in a SFnal setting (it brings to mind ... >> Captains' and officers' logs). ... Prolog is a computer language; prologue is that part of the text before ...
    (rec.arts.sf.composition)
  • Re: The Da Vinci Code.
    ... fascinating language it is, although I wish I could get my mind ... It seems to work in mysterious ways my brain is not at ... You're the Prolog Man, no doubt, not ...
    (alt.usage.english)
  • Re: newbie question: prologs interface,relation databases sql relationship
    ... > I am learning prolog now. ... But there is a question in my mind. ... > the relationship between prolog's logic interface and relation ... Prolog and relational algebra by describing these 5 primitive operations ...
    (comp.lang.prolog)