Logic and objects : language, application and implementation

In this thesis we investigate a number of extensions to logic programming. In particular we look at the incorporation of concepts from functional and object oriented programming into logic programming. This is done by extending the regular syntax of logic programming to include notations for functions and classes. The object oriented extension — class template programming — allows us to see how we might compose logic programs into larger programs. Furthermore, it gives a sound basis for understanding what a program module might be in the context of logic programming. The various features commonly found in object oriented programming languages such as message passing and inheritance are given an interpretation in this framework. As a typical example of the power of class template programming we look at the representation of graphics in a logic programming context. This denotational graphics formalism shows how the relationship between terms and numbers can be used to construct an analogous relationship between terms and pictures. This allows us to describe pictures with terms. Furthermore, we can describe relations over pictures — such as a picture generator or the relation of ‘being inside a picture’ — as relations over those terms. Class templates are used as the programming formalism in which these relations can be expressed. The semantics of our extensions are carefully examined, and in particular we prove that class templates are a conservative extension of logic programming. This gives us a sound basis for our class template language and also allows us to inherit theorems and programming techniques from logic programming itself. We show a preprocessor which translates class template programs into efficient Prolog programs. We also investigate how a Prolog compiler might be modified to handle class tempaltes and give even better performance than that of native Prolog. Table of

[1]  David Robson,et al.  Smalltalk-80: The Language and Its Implementation , 1983 .

[2]  John Darlington,et al.  The Unification of Functional and Logic Languages , 1986, Logic Programming: Functions, Relations, and Equations.

[3]  Carlo Zaniolo,et al.  Object-Oriented Programming in Prolog , 1984, SLP.

[4]  Keith L. Clark,et al.  Micro-Prolog - programming in logic , 1984, Prentice Hall international series in computer science.

[5]  Hervé Gallaire Merging Objects and Logic Programming: Relational Semantics , 1986, AAAI.

[6]  Steve Gregory,et al.  Parallel logic programming in parlo9 , 1987 .

[7]  Kazunori Ueda,et al.  Guarded Horn Clauses , 1986, LP.

[8]  Ehud Shapiro,et al.  A subset of Concurrent Prolog and its interpreter , 1988 .

[9]  J. A. Robinson,et al.  Logic, form and function , 1979 .

[10]  Keith L. Clark,et al.  PARLOG and PROLOG United , 1987, ICLP.

[11]  J. A. Robinson,et al.  A Machine-Oriented Logic Based on the Resolution Principle , 1965, JACM.

[12]  Roberto Barbuti,et al.  On the Integration of Logic Programming and Functional Programming , 1984, SLP.

[13]  M. H. van Emden,et al.  Logic Programming with Equations , 1987, J. Log. Program..

[14]  David Scott Warren,et al.  Objects as Intensions , 1988, ICLP/SLP.

[15]  Drew McDermott,et al.  Introduction to artificial intelligence , 1986, Addison-Wesley series in computer science.

[16]  Doug DeGroot,et al.  Logic programming - functions, relations and equations , 1986 .

[17]  Rod M. Burstall,et al.  HOPE: An experimental applicative language , 1980, LISP Conference.

[18]  Alain Colmerauer,et al.  Opening the Prolog III universe , 1987 .

[19]  Hassan Aït-Kaci,et al.  LOGIN: A Logic Programming Language with Built-In Inheritance , 1986, J. Log. Program..

[20]  Daniel G. Bobrow,et al.  Objects in Concurrent Logic Programming Languages , 1986, OOPSLA.