We present a new framework for amalgamating two successful programming paradigms: logic programming and object-oriented programming. From the former, we keep the delarative reading of programs. From the latter, we select two crucial notions: (i) the ability for objects to dynamically change their internal state during the computation; (ii) the structured representation of knowledge, generally obtained via inheritance graphs among classes of objects. We start with the approach, introduced in concurrent logic programming languages, which identifies objects with proof processes and object states with arguments occurring in the goal of a given process. This provides a clean, side-effect free account of the dynamic behavior of objects in terms of the search tree-the only dynamic entity in logic programming languages. We integrate this view of objects with an extension of logic programming, which we call Linear Objects, based on the possibility of having multiple literals in the head of a program clause. This contains within itself the basis for a flexible form of inheritance, and maintains the constructive property of Prolog of returning definite answer substitutions as output of the proof of non-ground goals. The theoretical background for Linear Objects is Linear Logic, a logic recently introduced to provide a theoretical basis for the study of concurrency. We also show that Linear Objects can be considered as constructive restriction of full Classical Logic. We illustrate the expressive power of Linear Objects compared to Prolog by several examples from the object-oriented domain, but we also show that it can be used to provide elegant solutions for problems arising in the standard style of logic programming. © 1991 Ohmsha, Ltd. and Springer.

Linear objects: Logical processes with built-in inheritance

Pareschi R.
1991-01-01

Abstract

We present a new framework for amalgamating two successful programming paradigms: logic programming and object-oriented programming. From the former, we keep the delarative reading of programs. From the latter, we select two crucial notions: (i) the ability for objects to dynamically change their internal state during the computation; (ii) the structured representation of knowledge, generally obtained via inheritance graphs among classes of objects. We start with the approach, introduced in concurrent logic programming languages, which identifies objects with proof processes and object states with arguments occurring in the goal of a given process. This provides a clean, side-effect free account of the dynamic behavior of objects in terms of the search tree-the only dynamic entity in logic programming languages. We integrate this view of objects with an extension of logic programming, which we call Linear Objects, based on the possibility of having multiple literals in the head of a program clause. This contains within itself the basis for a flexible form of inheritance, and maintains the constructive property of Prolog of returning definite answer substitutions as output of the proof of non-ground goals. The theoretical background for Linear Objects is Linear Logic, a logic recently introduced to provide a theoretical basis for the study of concurrency. We also show that Linear Objects can be considered as constructive restriction of full Classical Logic. We illustrate the expressive power of Linear Objects compared to Prolog by several examples from the object-oriented domain, but we also show that it can be used to provide elegant solutions for problems arising in the standard style of logic programming. © 1991 Ohmsha, Ltd. and Springer.
File in questo prodotto:
Non ci sono file associati a questo prodotto.

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11695/121049
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 125
  • ???jsp.display-item.citation.isi??? 0
social impact