From: Rolf Wester
Subject: Prolog and Lisp ?
Date: 
Message-ID: <3807A124.EC15E8B2@t-online.de>
Hi,

I know that questions like whether language A is better then laguage B
are not  very popular. But as I don't know much about either Lisp nor
Prolog and I would like to learn mor about symbolic and logic
programming it would be very helpful to know more about the concepts of
both languages and how they compare. Is there any arcticle that compares
this two languages or can anybody give me an answer to my question.

Thanks in advance

Rolf

···········@t-online.de

From: Robert Monfera
Subject: Re: Prolog and Lisp ?
Date: 
Message-ID: <38079BE7.A9F82DA8@fisec.com>
Rolf Wester wrote:
...
> I know that questions like whether language A is better then laguage B
> are not  very popular. But as I don't know much about either Lisp nor
> Prolog and I would like to learn mor about symbolic and logic
> programming it would be very helpful to know more about the concepts of
> both languages and how they compare. Is there any arcticle that compares
> this two languages or can anybody give me an answer to my question.

I hope others will refer to articles on this topic - the following is
just a brief opinion.

Lisp is best to start with to understand symbolic computing, and
learning Prolog and logic programming is a natural next step.  Your Lisp
understanding certainly helps you learn Prolog, which may not be the
case the other way around.

In fact, you see lots of examples of Prolog and constraint programming
implementations _atop_of_ Common Lisp implementations as seamless
additions (Screamer, Knowledgeworks,...), but none the other way around.

Other than the optimal sequence of learning these concepts and
languages, it's best to be familiar with all of them.  Logic programming
is at a higher abstraction level than symbolic computing.  While Lisp
can be used as a generic-purpose language as it supports several
paradigms such as functional programming and object-oriented
programming, Prolog seems to have a narrower focus.

You can start with http://www.alu.org for information about the above
mentioned systems.

Actually, the POP environment may also be good to play around with, as
it is freely downloadable, and (amongst others) has a Common Lisp and a
Prolog implementation atop of a virtual machine - although I'd rather
start with a demo of a commercial Common Lisp from www.franz.com or
www.harlequin.com because of their quality.

Regards
Robert Monfera
From: Reini Urban
Subject: Re: Prolog and Lisp ?
Date: 
Message-ID: <380b00aa.3101419@judy>
Robert Monfera wrote:
>Lisp is best to start with to understand symbolic computing, and
>learning Prolog and logic programming is a natural next step.  Your Lisp
>understanding certainly helps you learn Prolog, which may not be the
>case the other way around.

Not to me. I learned Prolog before Lisp, it helped a lot, and I think
that is generalizable, that learning a higher language before is easier
(better) than a lower one.
Prolog seems to much easier to learn than Lisp, so the natural step
seems to be:

->Prolog and ML or similar functional languages (for the concept)

->Lisp (which offers more control)

of course it helps to learn Prolog once you learned Lisp, as done in the
various books which base prolog on Lisp: 
"On Lisp" and "Paradigms of Artificial Intelligence Programming". 
esp. the latter is highly recommended as useful Prolog critic.
--                                         
Reini
From: Robert Monfera
Subject: Re: Prolog and Lisp ?
Date: 
Message-ID: <380B5F27.C1A0C962@fisec.com>
Reini Urban wrote:
> 
> Robert Monfera wrote:
> >Lisp is best to start with to understand symbolic computing, and
> >learning Prolog and logic programming is a natural next step.  Your Lisp
> >understanding certainly helps you learn Prolog, which may not be the
> >case the other way around.
> 
> Not to me. I learned Prolog before Lisp, it helped a lot, and I think
> that is generalizable, that learning a higher language before is easier
> (better) than a lower one.
> Prolog seems to much easier to learn than Lisp,

While Prolog is a higher level language than Lisp, it is a much more
restricted (constrained?) in terms of purpose and functionality.  Using
the AMOP metaphor which refers to CLOS+MOP as a range in the space of
programming languages rather than a point (which is a valid statement to
CL in general), Lisp is more general than Prolog.  Think of all the
reflective features of Lisp such as representing programs as data or
writing most implementations in Lisp itself.  To me it is more
straightforward to move from general to specific in learning.  You have
a point that you can do cooler (higher level, higher ROI) things with
Prolog than with Lisp after a short training, but it's a mere
consequence of Prolog being more specialized.  

Also, even a novice Prolog programmer needs to understand much of the
recursive searching mechanisms that are so often part of the standard
Lisp curriculum.

> so the natural step
> seems to be:
> 
> ->Prolog and ML or similar functional languages (for the concept)
> ->Lisp (which offers more control)

Yes, it's possible to go that way: to Prolog and say, Haskell, you could
even add Smalltalk to teach OO.  Now you have three languages to cover,
which have their own paradigms that appear quite distinct.  With Lisp,
you have one trivial syntax, and all these paradigms are co-operative. 
For example, I came to appreciate functional languages through Lisp
(which was the first functional language in the 50's) and lazy
evaluation techniques (see the Series chapter in CLtL2).

Robert
From: Rolf-Thomas Happe
Subject: Re: Prolog and Lisp ?
Date: 
Message-ID: <r5n1tfefke.fsf@bonnie.mathematik.uni-freiburg.de>
Robert Monfera:
> CL in general), Lisp is more general than Prolog.  Think of all the
> reflective features of Lisp such as representing programs as data or

With regard to code as data, Prolog closely resembles Lisp.  Prolog
represents facts and rules as terms aka structures.  (In contrast,
the younger and more declarative logic programming language G�del
represents programs as ADTs.)

rthappe
From: Jeff Dalton
Subject: Re: Prolog and Lisp ?
Date: 
Message-ID: <x2d7u7pcmv.fsf@todday.aiai.ed.ac.uk>
Robert Monfera <·······@fisec.com> writes:

> ...  You have
> a point that you can do cooler (higher level, higher ROI) things with
> Prolog than with Lisp after a short training, but it's a mere
> consequence of Prolog being more specialized.  

You can't even do higher-order functions in a reasonable way in
Prolog.  It is different from Lisp, not higher-level.
From: Jeff Dalton
Subject: Re: Prolog and Lisp ?
Date: 
Message-ID: <x2emenpcsx.fsf@todday.aiai.ed.ac.uk>
······@xarch.tu-graz.ac.at (Reini Urban) writes:

> Robert Monfera wrote:
> >Lisp is best to start with to understand symbolic computing, and
> >learning Prolog and logic programming is a natural next step.  Your Lisp
> >understanding certainly helps you learn Prolog, which may not be the
> >case the other way around.
> 
> Not to me. I learned Prolog before Lisp, it helped a lot, and I think
> that is generalizable, that learning a higher language before is easier
> (better) than a lower one.

I think Prolog is much harder to learn than Lisp.  Of course, it
depends a lot on how Prolog is taught.

In any case, in my experience, some of the people who have the most
trouble with Lisp are those who came to Lisp from Prolog, *especially*
if Prolog was their first programming language.

> Prolog seems to much easier to learn than Lisp, so the natural step
> seems to be:
> 
> ->Prolog and ML or similar functional languages (for the concept)
> 
> ->Lisp (which offers more control)

Well, I think that's the wrong way to see Lisp and that the Prolog ->
ML -> Lisp sequence is the wrong way around.  You can use a Lisp
subset that is much simpler and easier to understand than an
equivalent slice of Prolog or ML.

-- jd
From: Robert Monfera
Subject: Re: Prolog and Lisp ?
Date: 
Message-ID: <380B33B9.1078658@fisec.com>
David Bakhash wrote:

> I've never heard of POP, but I'd love to read about it, just for
> comparison's sake.

It's actually called Poplog, and it was developed at the University of
Sussex.  I do not recall the URL where you may download it, but it has
its own newsgroup (comp.lang.pop).  You can fire up CL, Prolog, ML (I
think) and the POP languages, which may communicate with one another
given that all of them are running atop of the same virtual machine.  I
have taken a brief look at the CLOS implementation, and it does not seem
to be the centerpiece of the implementation.

> [Prolog] is at a
> higher level of abstraction than a procedural language like Lisp.
                                     ^^^^^^^^^^
That was a typo, wasn't it?  Of course, one can bastardise his program
design and implementation, but normally you'd go procedural as an
exception, not the rule.  Personally I prefer functional OO style, and
would never restrict Lisp to any such category.

Regards
Robert
From: Dave Bakhash
Subject: Re: Prolog and Lisp ?
Date: 
Message-ID: <m3emesc88g.fsf@lost-in-space.ne.mediaone.net>
Robert Monfera <·······@fisec.com> writes:

> David Bakhash wrote:
> 
> > [Prolog] is at a
> > higher level of abstraction than a procedural language like Lisp.
>                                      ^^^^^^^^^^
> That was a typo, wasn't it?  Of course, one can bastardise his program
> design and implementation, but normally you'd go procedural as an
> exception, not the rule.  Personally I prefer functional OO style, and
> would never restrict Lisp to any such category.

The distinction to me between procedural and functional OO is hardly
existent.  I was comparing the two with declarative programming.

dave
From: Jeff Dalton
Subject: Re: Prolog and Lisp ?
Date: 
Message-ID: <x2g0z3pdd8.fsf@todday.aiai.ed.ac.uk>
Robert Monfera <·······@fisec.com> writes:

> Actually, the POP environment may also be good to play around with, as
> it is freely downloadable, and (amongst others) has a Common Lisp and a
> Prolog implementation atop of a virtual machine - although I'd rather
> start with a demo of a commercial Common Lisp from www.franz.com or
> www.harlequin.com because of their quality.

Strictly speaking, it is (or at least used to be) called "Poplog"
and it contains Pop-11, Common Lisp, Prolog, ML, and maybe other
things, all compiled to instrictions of a common virtual machine.

I don't know how ANSI and up-to-date PopLog Common Lisp is these
days, but I have used it in the post to develop things that had
to work.

-- jd
From: Aaron Sloman See text for reply address
Subject: Re: Prolog and Lisp ?
Date: 
Message-ID: <7vvrl2$ad9$1@soapbox.cs.bham.ac.uk>
[To reply replace "Aaron.Sloman.XX" with "A.Sloman"]

Jeff Dalton <····@todday.aiai.ed.ac.uk> writes:

> Date: 22 Oct 1999 17:30:11 +0100
> Organization: HCRC or CCS, University of Edinburgh
>
> Robert Monfera <·······@fisec.com> writes:
>
> > Actually, the POP environment may also be good to play around with, as
> > it is freely downloadable, and (amongst others) has a Common Lisp and a
> > Prolog implementation atop of a virtual machine - although I'd rather
> > start with a demo of a commercial Common Lisp from www.franz.com or
> > www.harlequin.com because of their quality.
>
> Strictly speaking, it is (or at least used to be) called "Poplog"
> and it contains Pop-11, Common Lisp, Prolog, ML, and maybe other
> things, all compiled to instrictions of a common virtual machine.

Robin Popplestone has added a Scheme implementatino.

>
> I don't know how ANSI and up-to-date PopLog Common Lisp is these
> days, but I have used it in the post to develop things that had
> to work.

Various Poplog versions with full system sources and documentation
are available at the FreePoplog site:

    ftp://ftp.cs.bham.ac.uk/pub/dist/poplog/freepoplog.html
or
    http://www.cs.bham.ac.uk/research/poplog/freepoplog.html

The Common Lisp in Poplog is CLTL2 compliant (with a fast
incremental compiler but no interpreter). It does not conform to the
ANSI standard. There's a list of limitations in this file:

    http://www.cs.bham.ac.uk/research/poplog/doc/lisphelp/bugs

which starts

| HELP BUGS                                        John Williams, Jun 1987
|                                                         Updated Jun 1995
|
| This file lists known bugs and omissions in the Poplog Common Lisp
| system. Poplog Common Lisp is an implementation of the language defined
| in Guy Steele's Common Lisp: The Language, 2nd Edition (Digital Press,
| 1990). It is not yet concordant with the forthcoming ANSI standard for
| Common Lisp.

Since the versions of Poplog include full sources for Poplog Common
Lisp, if anyone wants to attempt to extend it to full ANSI
compliance I'll be willing to make the results part of the free
poplog distribution.

Aaron
===
-- 
Aaron Sloman, ( http://www.cs.bham.ac.uk/~axs/ )
School of Computer Science, The University of Birmingham, B15 2TT, UK
EMAIL A.Sloman AT cs.bham.ac.uk   (NB: Anti Spam address)
PAPERS: http://www.cs.bham.ac.uk/research/cogaff/
From: Nick Roberts
Subject: Re: Prolog and Lisp ?
Date: 
Message-ID: <380C27DB.D5295C6A@callnetuk.com>
Rolf Wester wrote:
> I know that questions like whether language A is better then laguage B
> are not  very popular. But as I don't know much about either Lisp nor
> Prolog and I would like to learn mor about symbolic and logic
> programming it would be very helpful to know more about the concepts of
> both languages and how they compare. Is there any arcticle that compares
> this two languages or can anybody give me an answer to my question.

I guess probably the sensible answer to this question is for you to
investigate - and learn a little about - both languages: you may well
find you like one much more than another; you may find that there are
LISP programs available in your application domain of interest, or
Prolog programs (or both); you may find LISP has certain specific
capabilities that neatly fit what you require, or that Prolog does; you
may find the availability or other characteristics of
interpreters/compilers is an issue.

There are other languages to consider: ML, Haskell, and derivatives;
Scheme and other LISP derivatives; many conventional programming
languages can be used for logic programming (and may have certain key
advantages, such as speed); FORTH and its derivatives; some old
classics, like PLANNER; lots of 'expert system' products (some at
extortionate prices).

I'm sure others could make many further suggestions.

If you are a bookish sort of person (like me), I suggest you find a good
language-independent book about the subject (if you haven't already), or
two language-based books (one based on Prolog and one based on LISP). If
you are the 'hands-on' type, get a Prolog interpreter/compiler (e.g. SWI
is excellent) and a good LISP from the net, and try them both out.

Happy hunting,

-- 
Nick Roberts
Computer Consultant (UK)
http://www.callnetuk.com/home/nickroberts
http://www.adapower.com/lab/adaos