[comp.lang.prolog] OOP vs Logic Programming II

euakan@eua.ericsson.se (Theo.Kanter) (06/29/90)

THANKS!
My humble question on how logic programming and object oriented 
programming styles could be combined turned out to be stated
vaguely enough to be answered in many ways. Certainly I have my own opinion, 
but there are always others who know other things than you do, and therefore
I thank you for being so kind to share your knowledge. 

STANDPOINT.
At this stage I am more interested in how parts of a system prototype
can be modelled on the language in question. That is not to say that I 
do not care about any theoretical discussions, about whether OOP and LP
mix at all and it what ways. 

PRAGMATICS.
It seems that one can get far by employing the same strategy of
a message-passing style for Prolog as Abelson and Sussman did in the
book "Structure and Interpretation of Computer Programs". Jonas Nygren
(below) showed how one can add syntactic sugar to Prolog and implement
inheritance. Mark Plotnick (below) mentions a company which has taken this
farther an sells a *product* built on top of Quintus. One step farther
and your over the edge into another language, which does not make things
better, but in my opinion, merely changes the view or performance.

THEORY?
Ulrich N. (below) reminded me of one aspect of the OO paradigm. 
Namely, that objects have states. Now, neither mathematical logic or 
lambda calculus on which we try to base pure logical and functional languages
 provide for something called states. It seems to me that something is 
missing here, and that concurrency as in GHC and the like has little to do 
with it. 

LETTERS.
Last but not least I have enclosed a list of references out of personal
letters:

Once again, thank you for your effort.
--Theo


-----------------------------------------------------------------------
Theo Kanter		ELLEMTEL Telecommunication Systems Laboratories
			Box 1505, S-125 25 [lvsj| (AElvsjoe), Sweden

			Office:	+46 8 727 35 93
			Fax   :	+46 8 647 82 76
			Telex :	12452 EUA S
			Mail  :	Theo.Kanter@eua.ericsson.se




-------------------------- LETTERS --------------------------------------
-------------------------- LETTERS --------------------------------------
-------------------------- LETTERS --------------------------------------

From: norvell@csri.toronto.edu
Organization: CSRI, University of Toronto
-----------------------------------------

 >Take a look at Ait-Kacii's language  called Login.  It is described
 >in a MCC technical report and is about prolog extended with Inhertance.
 >In a similar vein, but more complex is David Maier's O-logic.

From: novick@ogicse.ogc.edu (David G. Novick)
Organization: Oregon Graduate Institute (formerly OGC), Beaverton, OR
---------------------------------------------------------------------

 >  P. Albert (1985).  Prolog et les objets.  Proceedings of the
 >  Fifth International Workshop on Expert Systems and their Application,
 >  Avignon, pp. 331-350.

 >  J. Conery (1988).  HOOPS manual.  Technical report, University of
 >  Oregon.


From: mark@infolog.se (Mark Plotnick)
Organization: Infologics AB, Box 91, 191 22 Sollentuna, Sweden.
---------------------------------------------------------------

Mark wrote that he knew about 2 commercial alternatives:

 > Prolog++ from LPA
 > LAP built on top of Quintus by a french company ELSA


From: yoshida@icot.or.jp (Yoshida Kaoru)
----------------------------------------

Commented Nils Hagner's respons to my article in the newsgroup, being 
the designer of A'UM.


From: Inst.f.Prakt.Info 1802 <brock@tuvie> (Ulbricht Neumerkel)
Organization: Technical University of Vienna, EDP-Center
--------------------------------------------------------

Wrote an interesting and lengthy letter. It's essence could be said to be
that OOP does not mix well with declarative programming. 
I am probably doing him injustice, whatever I write..
			 

From: jonas@falcon.ericsson.se (Jonas Nygren)
Organization: Ericsson Telecom, Stockholm, Sweden
-------------------------------------------------

Sent me a:

  > Sample POOPS class library: list{stack,queue,tree{binarytree{x}}}
  > In the spirit of same libraries described in 
  > Object-Oriented Software Constuction, B Meyer, Prentice-Hall 

Which essentially is syntactic sugar on top of Prolog, Jonas wrote.


From: ingvar@sics.se (Ingvar Olsson)
Organization: Swedish Institute for Computer Science, Kista, Stockholm
----------------------------------------------------------------------

Wrote that his approach in his current project was a pragmatic one,
and that he implemented a prototype using a message passing style
of programming. Sounds like it resembles my own strategy. I will
continue the discussions with Ingvar.

ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) (06/30/90)

In article <1990Jun29.123957.16727@eua.ericsson.se>, euakan@eua.ericsson.se (Theo.Kanter) writes:
> THEORY?
> Ulrich N. (below) reminded me of one aspect of the OO paradigm. 
> Namely, that objects have states. Now, neither mathematical logic or 
> lambda calculus on which we try to base pure logical and functional languages
>  provide for something called states. It seems to me that something is 
> missing here, and that concurrency as in GHC and the like has little to do 
> with it. 

It depends on what you mean by "mathematical logic".
There are quite a few temporal logics, and dynamic logic is as mathematical
as you please.

Two books which I bought a couple of months ago finally arrived.

	From Standard Logic to Logic Programming,
	Introducing a Logic Based Approach to Artificial Intelligence
	ed. A. Thayse
	Wiley, Chichester, 1988

	From Modal Logic to Deductive Databases,
	Introducing a Logic Based Approach to Artificial Intelligence
	ed. A. Thayse
	Wiley, Chichester, 1989.

I haven't had a chance to get very far through them yet, but I can tell
you right now that the review I'm going to post to this newsgroup when
I get back from my vacation is going to be _very_ positive.  If you
don't already know about dynamic logic (the basis of the Manchandra &
Warren approach to "logical updates") this is a painless place to find out.
-- 
"private morality" is an oxymoron, like "peaceful war".

chik@icot.or.jp (Chikayama Takashi) (07/02/90)

In article <1990Jun29.123957.16727@eua.ericsson.se> euakan@eua.ericsson.se (Theo.Kanter) writes:

> THEORY?
> Ulrich N. (below) reminded me of one aspect of the OO paradigm. 
> Namely, that objects have states. Now, neither mathematical logic or 
> lambda calculus on which we try to base pure logical and functional languages
>  provide for something called states. It seems to me that something is 
> missing here, and that concurrency as in GHC and the like has little to do 
> with it. 

Concurrency as in GHC has _much_ to do with object states actually.
In object-oriented style GHC programs, processes correspond to
objects, status of on-going computation corresponds to object states.
This almost directly corresponds to Carl Hewitts' "actors".

You might consider, however, that GHC or any other committed choice
style languages are not logic programming languages, depending on what
you mean by the words "logic programming".

At 7th ICLP at Jerusalem:

    LINEAR OBJECTS: LOGICAL PROCESSES WITH BUILT-IN INHERITANCE
	Jean-Marc Andreoli, Remo Pareschi

is presented, which explains "states" in the framework of "linear
logic".  The model is completely different from OOP in GHC, but linear
logic also has much to do with concurrency.

You (or Ulbricht Neumerkel) might, however, exclude this also, because
the logic it is based on is not classical logic.

Takashi Chikayama
Institute for New Generation Computer Technology

steven@triton4.ecrc.de (Steven Prestwich) (07/09/90)

Two recent contributions to the problem of merging object-oriented
programming with logic programming are the following:

1990 "Linear Objects: Logical Processes with Built-in Inheritance"
by Jean-Marc Andreoli and Remo Pareschi. In Proceedings of the Seventh
International Conference of Logic Programming

1990 "LO and Behold! Concurrent Structured Processes"
by Jean-Marc Andreoli and Remo Pareschi. It will appear in Proceedings
of OOPSLA90

Copies of both papers are available from the authors at the following
address:

ECRC
Arabellastr. 17
D-8000 Munich 81
FRG
{jeanmarc, remo}@ecrc.de