An overview of this book

\label{des/intro/ov} Our research covers the design, the semantics and the implementation of the language DLP.

Design

In part I we will introduce the language and present a number of examples that illustrate the use of the language. However, before this, an introduction will be given to the paradigms underlying distributed logic programming.

Logic programming

Since, undeniably, logic programming lies at the heart of our approach, an extensive introduction is given to logic programming, and the language Prolog. The notion of a logic program will be introduced and a thorough account will be given of the relation between the declarative, that is logical, interpretation and the procedural interpretation of a logic program, allowing logic programs to be used for computing. The nature of unification will be explained and the role of the logical variable therein. For readers not familiar with the language Prolog, a treatment will be given of the basic constructs of the language as well as its particular features. Examples will be presented that explain the use of these features. Further, two typical search problems will be discussed for which Prolog may conveniently be used.

Object oriented programming

To introduce object oriented programming, a brief account will be given of the developments that have contributed to the popularity of object oriented programming. Objects will be characterized as a device to encapsulate data and procedures that operate on these data. We will look at classes, as templates for creating objects. Then the notion of inheritance will be introduced, and the use of inheritance to factor out the functionality of a collection of objects or to create a specialization hierarchy will be explained. Further, we will discuss the role of object oriented modeling from the perspective of the requirements analysis and the design underlying a system. \nop{ Further, the relation between subclasses and subtypes will be discussed and the role of this distinction in an untyped setting. Finally, to conclude our introduction of object oriented programming, we will look at some object oriented languages and systems. }

Parallel/distributed programming

Next, a characterization will be given of the major features of distributed programming and the three models underlying parallel/distributed programming will be introduced: communicating sequential processes, object-based concurrency and concurrent logic programming. Communicating sequential processes provide a basic model to employ parallelism. Communication in this model may be characterized as synchronous transfer of values. Then it will be explained how objects may be combined with concurrency and we will take a closer look at the rendez-vous concept that is supported by Ada as a means to call remote procedures. The notion of active objects and method calls by rendez-vous will then be introduced. Lastly, we will discuss the computation model of concurrent logic programming and show how objects may be implemented using shared logical variables that act as channels between processes.

Software engineering

We will conclude the introduction of the paradigms underlying distributed logic programming by reviewing the contributions of each of these paradigms to the practice of software engineering and we will assess their shortcomings. Briefly, we will discuss how distributed logic programming might provide a remedy.

The language DLP

After introducing the paradigms out of which distributed logic programming originated, we will introduce the constructs of the language DLP by exploring how the language Prolog may be extended to support parallel object oriented programming. Objects will be introduced as a modularization construct that may contain non-logical (instance) variables, and it will be described how processes are created to evaluate method calls and to execute the own activity of (active) objects. We will explore the use of synchronous bi-unification accross channels as a mechanism to communicate between objects. Then method calls by rendez-vous will be introduced that allow synchronization by explicit acceptance statements and that support distributed backtracking over the results of a call. An extension of accept statements will be introduced that allows acceptance to depend on the parameters of the call. Then, it will be shown how the communication primitives implementing the synchronous rendez-vous may be used for engaging in an asynchronous rendez-vous and how this mechanism allows the user to define (restricted) and-parallelism. We will further explain how the language supports the distribution of objects and processes over processors. Finally, after summarizing the constructs by which DLP extends Prolog, we will distinguish three subsets of DLP of increasing complexity that will serve as a basis for our semantic study of DLP in part II.

Object oriented modeling

To illustrate how DLP may be applied in developing actual systems it will be shown how inheritance and delegation may be used to factor out control in searching a state space. Also, an object oriented solution to the N-queens problem is presented that illustrates how to connect a number of active objects. The use of inheritance for knowledge representation will be investigated and we will discuss the way that inheritance may be of influence on backtracking. To demonstrate the role of object oriented modeling in developing systems for distributed problem solving we will describe the specification and implementation of a distributed medical expert system. The example shows how control may be distributed according to the hierarchic organization of the knowledge.

Design perspectives

Having introduced the language DLP we will take a step back and reflect on the motivations underlying our approach to distributed logic programming. We will discuss the notion of distributed knowledge processing and our contribution to this area. We will then pay attention to related work aiming at the integration of logic programming, object oriented programming and parallel/distributed programming. A distinction will be made between these approaches according to their point of departure, that is whether they strive for an integration starting from a combination of logic programming and object oriented programming, logic programming and parallelism, or object oriented programming and parallelism. The design choices made for DLP will be motivated during this discussion.

Semantics

In part II, we will study the semantics of DLP. To characterize the behavior of programs, we will employ the technique of structured operational semantics introduced in  [Plo83]. In order to show that these semantics are well-defined in a mathematical sense, we will also provide a compositional denotational semantics. The mathematical framework in which this semantic study takes place is the metric approach originally developed in  [BZ82]. Chapter 6 provides a thorough introduction to the metric approach and its application to concurrency semantics. In order to manage the complexity of our task, we have distinguished three subsets of the language DLP that allow us to study the various behavioral phenomena of distributed logic programming in a more isolated way. The simplest subset is a language that supports backtracking. We will extend this language with features for dynamic object creation and synchronous communication between objects with local backtracking that takes place within the confines of an object. Finally, our last subset represents a language that supports dynamic object creation and method calls by rendez-vous, allowing distributed backtracking over the results of a rendez-vous. Before giving the semantics of (these subsets of) DLP, we will study the semantics of what we call uniform abstractions of these subsets, in which we will pay no attention to assignments to non-logical variables and the unification of logical variables. The results of this preliminary study carry over to our semantic study of DLP in a surprisingly smooth way. It must be remarked that the semantics given are of a behavioral nature, that is characterizing the flow of control within objects and the communication between objects. These behavioral semantics must be regarded as complementary to a declarative semantics that clarifies the meaning of a program in terms of a logical model. It seems unlikely that such a declarative semantics is possible at all, without taking recourse to dynamic logic or possible worlds semantics. In chapter 12 some recommendations will be given of how to approach the problem of providing a declarative semantics for DLP.

Implementation

In part III, a detailed description is given of the implementation model employed in the prototype implementation of DLP. Our solution to integrating the computation models of logic programming and object oriented programming in a parallel/distributed setting has been to extend an imperative parallel object oriented language with logic programming capabilities. Since our language DLP supports backtracking over the results of a rendez-vous, we had to make an explicit distinction between objects and processes. An interesting feature of our solution is the way the results of a method call are communicated to the calling process by means of so-called resumptions, which are goals that must be executed by the caller in order to effect the bindings resulting from the call. In developing the prototype implementation of DLP, the code for the Prolog interpreter was derived from a formal continuation semantics of Prolog. Employing such a technique for implementing a protoype of an experimental language may be fruitful, since the resulting code will in general be rather compact. For an efficient implementation, however, an abstract machine approach such as the WAM for Prolog is an absolute necessity. See  [Wa83]. A detailed description is given of the implementation of the prototype of DLP, including the way terms are handled, the implementation of objects and the communication protocols governing the communication between objects. We will then comment on the current status of the language and its implementation. Further, some recommendations will be given for improving the efficiency of the DLP system and we will explore the possibility of providing a declarative semantics for a distributed logic programming language such as DLP.