Lambda the Ultimate

inactiveTopic Logic/Object Oriented Fusion
started 3/14/2003; 4:05:18 PM - last post 9/14/2003; 10:07:14 AM
Brent Fulgham - Logic/Object Oriented Fusion  blueArrow
3/14/2003; 4:05:18 PM (reads: 1637, responses: 7)
Logic/Object Oriented Fusion
A frequent question confronting attempts to meld Logic/Declarative and Object Oriented language design is Why? -- Why would OO be needed in the presence of a good system of modules?

This collection of links is a starting point to find the answer:

  1. Logical Foundations for Declarative Object-Oriented Programming: This paper discusses attempts (and the rationale) in reasoning about Object Oriented programs written in a declarative style. The author's main reasoning is that structuring logic based programs around a set of objects allows reuse and aggregation of existing logical predicates as a way of managing complexity.

    In my mind, this doesn't really seem all that OO-ish, except for the inheritence. A module system could handle this behavior assuming it could inherit methods from a parent module and be used to dynamically dispatch to the correct predicate. State and message sending semantics are not implemented in this approach.

  2. Object Oriented First Order Logic: This paper deals with the unwieldy nature of First Order Logic (FOL), and reasons about the efficacy of using the Object Oriented paradigm to manage the complexity. While the notation looks reasonable, I could find no sample implementation so it's hard to say how useful it is in practice. Work is continuing on this project.
  3. FLORA: The Secret of Object-Oriented Logic Programming discusses an object-oriented extension to F-Logic notation, built on top of XSB. This has some fascinating ramifications, including the notion of structural inheritance and behavioral inheritance. Structural inheritance refers to inheritance of signatures (read "interfaces"), while Behavioral refers to implementation inheritance (read "subclassing"). They seem to have moved on to FLORA-2.

What I do not find are good papers about whether the benefits of the OO structuring paradigm provide any improvement over a system of modules. I suspect that a strong module system, such as the PLT module system, would probably be sufficient on its own.
Posted to Logic/Declerative by Brent Fulgham on 3/14/03; 4:58:37 PM

water - Re: Logic/Object Oriented Fusion  blueArrow
3/15/2003; 5:02:41 PM (reads: 793, responses: 0)

There's some evidence that you're right in the Maude project. Maude is an equational, concurrent rewrite language with a very very strong module system (hence the name). It does include an object-oriented style of language extension, written in Core Maude.

However, the modules are not the source of the object-orientedness: it's merely a view on the existing semantics of Maude itself.

Frank Atanassow - Re: Logic/Object Oriented Fusion  blueArrow
3/17/2003; 5:56:40 AM (reads: 703, responses: 0)
...including the notion of structural inheritance and behavioral inheritance. Structural inheritance refers to inheritance of signatures (read "interfaces"), while Behavioral refers to implementation inheritance (read "subclassing").

Just so we are clear on this: maybe in FLORA behavioral inheritance is restricted to implementation inheritance, but in general "behavioral inheritance" means "specification inheritance".

Brent Fulgham - Re: Logic/Object Oriented Fusion  blueArrow
3/17/2003; 9:51:17 AM (reads: 680, responses: 0)
Frank -- exactly. I was merely using the paper authors' terminology.

Franck Arnaud - Re: Logic/Object Oriented Fusion  blueArrow
3/17/2003; 11:15:56 AM (reads: 693, responses: 0)
Why would OO be needed in the presence of a good system of modules?

I am puzzled the question is asked in those terms. To me, OO is above all a module system. The main difference between OO and other module systems is that OO is usually expressed at a lower level of granularity than usual (modules are smaller) and the module construct is first class, which is not always a property of non-OO module systems. So it seems to me the question should rather be: is OO a good module system?

Brent Fulgham - Re: Logic/Object Oriented Fusion  blueArrow
3/18/2003; 11:11:21 AM (reads: 640, responses: 1)
In my mind, OO implies state. Each object represents an 'instance' of some class, where instance implies some scope/lifetime and therefore state.

A module system represents (to me) a grouping of functionality, orthogonal to the concept of state.

But the above ideas do not change the value of your question -- we can still ask "Is OO a good module system?"

Ehud Lamm - Re: Logic/Object Oriented Fusion  blueArrow
3/18/2003; 11:17:12 AM (reads: 674, responses: 0)
But the above ideas do not change the value of your question -- we can still ask "Is OO a good module system?"

And then answer: "No, beacuse OO implies state" ?

xeo_at_thermopylae - Re: Logic/Object Oriented Fusion  blueArrow
9/14/2003; 10:07:14 AM (reads: 310, responses: 0)
I'm in favor of the OPs implicit stance: there's no need for OO in LP. Any OO model will always be at least as difficult to create as an LP model and eventually will change. A logic model will always be easier to change.

The popularity of OOP is forcing us through a recreation of the types of problems created by CODASYL network databases years ago. Codd and Date proved that the network models were inflexible and that the relational model was in all respects superior. It seems that another 10 years will be required before OOP'ers get sufficiently ensnarled in their networks of objects to realize that the arguments of Codd and Date apply to the utility of OO languages versus LP.