[net.lang.prolog] Prolog: first order??

michaelm@bcsaic.UUCP (michael b maxwell) (07/02/85)

> >From: vantreeck@logic.DEC
> Date: 26 Jun 85 16:01:50 GMT
> They also think that current implementations of Prolog are severely
> lacking in features that help produce reliable and maintainable programs. But
> some experts think that there is so much good work being done on the
> theoretical issues of how to extend the language to make it more useful while
> remaining strictly first order logic that to put Prolog into concrete at this
            ^^^^^^^^^^^^^^^^^^^^^^^^^^
> time would be not be productive. 

Can someone clear something up for me?  I would have thought that Prolog
was *not* "strictly first order logic," because of the existence of
predicates like "call" and "=..".  Clocksin and Mellish seem to say
something like this (2nd. ed., pg 255; 1st. ed., pg. 226).  Would
someone care to comment on this?

shebs@bcsaic.UUCP (stan shebs) (07/03/85)

In article <174@bcsaic.UUCP> michaelm@bcsaic.UUCP (michael b maxwell) writes:
>
>Can someone clear something up for me?  I would have thought that Prolog
>was *not* "strictly first order logic," because of the existence of
>predicates like "call" and "=..".

Prolog is first-order logic in the same way that Lisp is lambda-calculus.
It's amazing what a language can pick up on the way from theory to design
to implementation hacking...

							stan shebs

rggoebel@water.UUCP (Randy Goebel LPAIG) (07/12/85)

> > remaining strictly first order logic that to put Prolog into concrete at this
>             ^^^^^^^^^^^^^^^^^^^^^^^^^^
> > time would be not be productive. 
> 
> Can someone clear something up for me?  I would have thought that Prolog
> was *not* "strictly first order logic," because of the existence of
> predicates like "call" and "=.."...

The semantics of pure Prolog is well understood from a first order viewpoint
(e.g., see John Lloyd's book ``The Foundations of Logic Programming'',
Springer-Verlag, 1984).  The semantics of meta-language operations is neither
standardized nor well-formalized.  Relevant here is Bowen and Kowalski's
paper ``Amalgamating language and metalanguage in logic programming'' 
in the book ``Logic Programming'' edited by Clark and Tarnlund, Academic 
Press, 1982.

Randy Goebel
Logic Programming and Artificial Intelligence Group
Computer Science Department
University of Waterloo
Waterloo, Ontario, CANADA N2L 3G1
UUCP:	{decvax,ihnp4,allegra}!watmath!water!rggoebel
CSNET:	rggoebel%water@waterloo.csnet
ARPA:	rggoebel%water%waterloo.csnet@csnet-relay.arpa

debray@sbcs.UUCP (Saumya Debray) (07/22/85)

> There are people in our department who maintain that PROLOG is not first
> order *logic* since it relies on features like the ordering of clauses,
> and the ordering of goals within a clause.
> -- 
> 	Dave Berry. CS postgrad, Univ. of Edinburgh		

"Pure" Prolog has a well-defined semantics in terms of first order
logic (e.g. see [van Emden & Kowalski, JACM v.23 #4 1976], [Apt & van
Emden, JACM v.29 #3 1982]).  Relying on a specific clause order for
resolution, as Prolog does, loses completeness but not soundness,
i.e. at worst, Prolog may loop on a query although a refutation exists.
It turns out (as Apt & van Emden show in their proof of completeness
of SLD-resolution) that the order in which literals are selected
for resolution is irrelevant for completeness _as_long_as_ the clauses
to be resolved against can be chosen nondeterministically.

It is possible, however, to lose the logical semantics once "not" is
thrown in, unless you're careful about variables inside negations.
-- 
Saumya Debray
SUNY at Stony Brook

	uucp: {allegra, hocsd, philabs, ogcvax} !sbcs!debray
	arpa: debray%suny-sb.csnet@csnet-relay.arpa
	CSNet: debray@sbcs.csnet

kyukawa@water.UUCP (Keitaro Yukawa) (07/22/85)

Note that Randy Goebel wrote:
     The semantics of pure Prolog.....
Clearly he is referring to model theoretic or fixpoint semantics;
he mentions neither proof theory nor implementation.

Kei Yukawa
Logic Programming and Artificial Intelligence Group
University of Waterloo

db@cstvax.UUCP (Dave Berry) (07/23/85)

In article <697@water.UUCP> rggoebel@water.UUCP (Randy Goebel LPAIG) writes:
>> Can someone clear something up for me?  I would have thought that Prolog
>> was *not* "strictly first order logic," because of the existence of
>> predicates like "call" and "=.."...
>
>The semantics of pure Prolog is well understood from a first order viewpoint
>(e.g., see John Lloyd's book ``The Foundations of Logic Programming'',
>Springer-Verlag, 1984). 

There are people in our department who maintain that PROLOG is not first
order *logic* since it relies on features like the ordering of clauses,
and the ordering of goals within a clause.
-- 
	Dave Berry. CS postgrad, Univ. of Edinburgh		
					...mcvax!ukc!{hwcs,kcl-cs}!cstvax!db