LOO: An Object-Oriented Logic Programming Language

Paolo Mancarella, A. Raffaetà and F. Turini

Abstract:

Object-oriented programming has proven to be appropriate for the construction of complex software systems. On the other hand, logic programming stands out for its declarative flavor, built-in inference capabilities and well defined semantics. We present a language, called LOO, which combines object-oriented programming and logic programming. We model classes as sets of clauses which represent their methods. An object is an instance of a class and it is identified by a unique name. We use a set of operators over theories for handling state changes and for modeling inheritance. A message sent to an object is translated into a goal which is solved with respect to a dynamic composition of clauses representing its class and its current state. The challenge lies in avoiding the superimposition of a complex syntactic and semantic structure over the simple structure of logic programming. We have tried to extend logic programming in a conservative way as much as possible, in order to retain a simple and clear semantics.


Paolo Mancarella (paolo@di.unipi.it)