OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

# RE: NPR, Godel, Semantic Web

• From: "C. M. Sperberg-McQueen" <cmsmcq@acm.org>
• To: xml-dev@lists.xml.org
• Date: Tue, 08 May 2001 08:24:10 -0600

```At 2001-05-07 20:11, Mike Champion wrote:
>So, are there any known "truths" expressible in Prolog
>that (plausibly) can't be "inferenced" with its rules?

Sure.  Prolog texts don't talk about them in these
terms (as Goedel sentences), but Prolog texts almost
always mention, at some point, that depending on
how you write your predicates some things which
cannot in fact be inferred by the Prolog system
(working procedurally).

First example:

/* All humans are descended from Adam and Eve */

human(eve).
human(N) :- descendant(N,eve).

descendant(N,N).
descendant(N,N2) :- parent(N,N3), descendant(N3,N2).

parent(cain,eve).
...

This will (I think -- I'm kind of rusty and haven't
run this), when provided with a suitable set of facts
involving 'parent', produce the expected result.
It will for example, infer that 'abel' is human.

Change the order of the rules for 'human', however,
to 3412, however, and the system will have trouble
figuring out even that 'adam' is human.

An alternative view of the same problem:  consider
the two standard definitions for appending two lists,
first the general one:

append([],L,L).
append([A|B],C,[A|D]) :- append(B,C,D).

and next the restricted one:

append([],L,L) :- !.
append([A|B],C,[A|D]) :- append(B,C,D).

The second one works only when at the initial call the
first two arguments are instantiated and the third is
possibly not instantiated.  The first one works in other
cases as well: you can use it to generate all the
prefixes or all the suffixes of a list, by calling it
with only the third parameter instantiated.

The fact that the introduction of the cut (!) makes
certain inferences inaccessible is the whole point of
the discussion (well, almost the whole point; the
other point usually made is that for the restricted
case it's designed for, the second form of the predicate
is typically lots faster and uses less memory).

best regards,

Michael Sperberg-McQueen

```