Logical Objects
provide
an extension of Prolog with so-called object clauses.
[Co88].
An object clause is a generalized Horn clause of
the form
Such a clause is activated when a compound goal contains
both a literal unifying with
and a literal unifying with .
In this way, after having created an object with an initial state,
goal literals may be interpreted as method calls
to an object, that as a result may change its state in an invisible
way.
A characteristic feature of this proposal is that it allows
the usual Prolog backtracking over method calls.
The advantage of the approach sketched is that
`it does minimal damage to the pure logic programming foundations'.
As a drawback, we may mention that referential transparancy
is lost: the meaning of an atom is no longer
a fixed relation but relative to all possible states of the object
for which the atom is a method.
Two implementations exist.
The first is a meta-interpreter, which maintains a
list of object states.
The second exists in the form of a preprocessor
translating object clauses to Prolog clauses.
An implementation based on an extended version of the
Warren Abstract Machine is planned.