Re: ASSERT in SWI Prolog



A.L. <alewando@xxxxxxxxxxxx> wrote:
} On Thu, 17 Aug 2006 07:29:42 +0000 (UTC), russell kym horsell
} <kym@xxxxxxxxxxxxxxxxxxx> wrote:
} >A.L. <alewando@xxxxxxxxxxxx> wrote:
} >} On Wed, 16 Aug 2006 09:24:28 +0000 (UTC), russell kym horsell
} >} <kym@xxxxxxxxxxxxxxxxxxx> wrote:
} >} >Advait <advait_raut@xxxxxxxxxxxxxx> wrote:
} >} >> You cannot have control on the order of facts.
} >} >> Test this ...
} >} >[...]
} >} >Eh? "All facts"? I notice your claim is not qualified with a "some".
} >} >There is some (in?)famous saying along the lines of:
} >} >"If a scientist researches all of the relevant data and papers
} >} >on a topic, and declares that something is `impossible', they are
} >} >most likely wrong."
} >} >Programs can critically depend on the (search) order of facts.
} >} Then you are using Prolog to write Pascal program
} >A deduction and conclusion as equally valid and unambiguous as your first. ;)
} If
} >} >Programs can critically depend on the (search) order of facts.
} then there is something wrong with these programs. Switch from
} Prolog to C++ or even better, C. Or, maybe, BASIC.

I know you *think* you are saying something profound. :)

But Prolog is not a declarative language. It is a *programming* language.
Order of conjuncts generally matters, despite some work in the past 30 years to
make it not matter so much. The order of clauses matters.
And the order of related facts matters.
The termination of almost all extant programs (considering most were not
written in the past 5 years) depends on such things.

Removing the dependence on order has the obvious information-theoretic
implication.

If you want a declarative language, I'm sure the folks at MU won't mind me
plugging Mercury. Maybe there's a group for it, even. :)

.



Relevant Pages

  • Re: OO versus RDB
    ... There is a very simple mapping from RM to PROLOG. ... a representation based on predicates, ... 'connection' comes from the fact that PROLOG stores rules about facts ...
    (comp.object)
  • Re: Representing data structures in Prolog
    ... > the representation of knowledge with Prolog. ... I have several facts of the form. ... > object in object oriented languages. ... And create rules with multiple arguments to express more succinctly ...
    (comp.lang.prolog)
  • Re: database: prolog and relational
    ... I have on occasion seen Prolog referred to as "relational". ... A Prolog system effectively consists of a database ... of facts, a collection of predicates which tie the facts together (and ...
    (comp.lang.prolog)
  • Re: Representing data structures in Prolog
    ... > of a traffic control system. ... > of knowledge with Prolog. ... I have several facts of the form. ... > object in object oriented languages. ...
    (comp.lang.prolog)
  • Re: database: prolog and relational
    ... > The Prolog facts database is not relational for a couple of ... > database affects the evaluation of predicates. ... (I don't have a Prolog ... > did it last year for various mad reasons). ...
    (comp.lang.prolog)