Object-oriented implementation of Prolog
Abstract
Logic programming is a discipline of describing problems in high-level abstraction
by separating logic from control. Conventional Prolog interpretation or compilation
models take a procedural view of Prolog programs. A description of interpretation
models was summarized by Bruynooghe[Bru82] and a well-known compilation model
was introduced by Warren[War83].
The goal of this study is to present an alternative approach to construct Prolog
execution model to tackle the complexities caused by conventional Prolog execution
models. By taking the advantage of object-oriented techniques, a new model - object-oriented
model is proposed. Instead of decomposing a given Prolog program into a
set of procedures, the model translates it into a collection of coordinated objects
which simulate components of the problem to be solved.
First, the object-oriented model is described in terms of the object base and
inference engine. The object base represents the components of Prolog programs
naturally with corresponding objects in terms of AND/OR network. The inference
engine, which specifies the operational behaviour of the objects, is embedded in the
object base and independent of any specific Prolog program.
Secondly, implementation issues of a Prolog system based on the object-oriented
model are presented. A transformation program is developed to translate any given
Prolog program into a set of objects and assign the corresponding relations among
them. The implementation of the inference engine adopts Robinson’s resolution
[Rob79] which consists of two major algorithms; unification and backtracking.
Finally, the first parameter hashing optimization and a uniform interface to adopt new built-in predicates are addressed to show the extensibility of proposed Prolog
system.
An experimental object-oriented Prolog system, LU-Prolog, has been developed
based on the proposed model. An evaluation of the performance of LU-Prolog and
its future directions are also presented in this thesis.
Collections
- Retrospective theses [1604]