[Home]

Object-Oriented Language: Prolog

[Logo]


Prolog is a goal-oriented, primarily declarative language based on predicate logic. Goal-oriented means that a program proceeds by attempting to achieve a goal which is itself defined by other goals. Prolog is declarative in that a Prolog program generally declares "what" is to be done but not "how" to achieve a goal. (as opposed to imperative -- a C or Basic program defines a series of steps to carry out).

PROLOG means PROgramming in LOGic. A Prolog program is largely composed of logical predicates called Horn clauses. A horn clause consists of a head, and a set of clauses to be proven separated by :-. A typical Prolog statement has the general form:

clauseh(Vh) :- clause1(V1),..,clausem(Vm)

which means clauseh succeeds (for variable set Vh) if the series of clauses clause1,..,clausem succeed.

Prolog finds solutions through unification of variables - each clause binds variables to definite values. When all clauses are examined and all variables in Vh are bound, the goal succeeds. But if a variable can not be bound for a given clause, the clause fails. Standard Prolog evalutates clauses from left to right. When a clause fails, Prolog backtracks - it goes back to previous clauses to continue trying to unify with alternative bindings. Unification give Prolog the ability to find multiple solutions to for a given query or goal.

Prolog was created in the early 1970s by Alain Colmerauer, Robert Kowalski, Phillipe Roussel and collegues. Modern implementation began with a virtual machine called the "Warren Abstract Machine" implemented by David H. D. Warren at Edinburgh. Prolog is now defined by an ISO (1995) Standard. However, much current theoretical value comes from important extensions. These include:

Many extensions include or relate to OO abilities. Some go beyond traditional OO.

Constraint programming can be implemented as an extension of Prolog that binds variables "incrementally" so that variables are constrained (for instance numerically, or by class) before they are bound. Many Prolog systems include CLP.

Some logic languages Mercury, KLIC, and Oz, incorporate concurrency and parallelism by eliminating backtracking and by restricting or eliminating unification. ECLiPSe and BAP, however, are extentions of Prolog with implicit or explicit parallelism.

Linear logic models causality, state transitions, and accounting for resources used in logic. Linear logic programming originated from the work of Jean-Yves Girard. Linear logic systems such as Lolli and LLP included on this page, are supersets of Prolog that define additional operations for these purposes.

Progol is also a superset of Prolog that provides rapid definition of classes and attributes and includes extensions for inductive logic. Inductive logic often uses a schema of classes, instances and attribute values to define a rule base.

In fact, objects, attributes, and inheritance are a frequent focus in logic applications. The ISO Prolog standard does not define traditional OO features: classes, inheritance, methods, and events (although OO standards are under consideration). However, Prolog is highly extensible. OO capabilities can be and often are implemented in extensions. Implementing traditional multiple inheritance can be done with just a few Prolog statem-ents, albiet maybe simplistically. But, it is equally possible to equip Prolog with additional object and inheritance capabilities not available in traditional OO.

Doing so is sometimes necessary. Many practical and research logic problems push beyond the capabilities of traditional OO. In reasoning about beliefs, norms, learning, linguistics, agents, and incomplete knowledge, inheritance is extra-hierarchial and fluid. Knowledge changes over time and occurs as inheritance networks rather than as strict hierarchies - Additional inheritance and object relation styles need to be considered. It is valuable to view inheritance network tools as advanced OO with added capabilities for role definition, defeasibility, nonmonotonicity, abduction, and preferencial inheritance.

LOGIN, an early OO extension of Prolog, was created in the mid-1980s by Ait Kaci (also the creator of the LIFE language) and Nasr. Today, there are numerous OO Prolog extensions both system specific and system independent versions.

In addition to OO extensions, there are also interoperability tools, database tools, deductive database Prolog systems, and Java implementations of Prolog and Java-Prolog libraries. Some Prolog-Java implementations enable Prolog to manipulate Java objects and properties.

This page includes:

OO provides an exciting and even broad, if incomplete spectrum in which to view logic programming, a field which is extensive and growing. This page thus shows some of the flavors of LP:



[Home]   [Mirrors/Hosts]  
  What´s New? Most Wanted About Cetus Cetus Team Legal
  Download URL-Minder Cut & Paste Survey

 
Partial match  
 
Search www.cetus-links.org

and=";"   or=","   no spaces!
 
  Tips
 

Copyright © 1996-1998 by Manfred Schneider
Page maintained by Richard Katz
Last revision: July 26, 1998
Site Visits: [Site Visits] since May 1996