trb at cs.mu.OZ.AU trb at cs.mu.OZ.AU
Tue Jul 12 08:27:26 UTC 1994

In my previous posting I missed some important points.

If there are no side-effects in methods, and the order of statements
is not important, then it is only necessary to add a trail for each
local variable in order to support backtracking. In an expressive OO
language like self, a trail can be implemented easily using standard
data-structure classes.

When this is done, the result is a real logic language for writing
methods. Self can then be called an OO-LP language!

The semantics might even turn out to be declarative. PARLOG++ is an
OO-LP language that maintains mutable state by modelling objects as
predicates that call themselves recursively, continually passing their
own state back to themselves (thus the state can only be modified at
the end of an inference). Because the state arises from the recursive
calls it has proper logical semantics (the semantic base of PARLOG is
a bit dubious, but this is the fault of PARLOG alone - not the OO
part). The state that is modeled in this way is only simulated state,
although it behaves just like real state!

Perhaps this scheme could be run in reverse for Self+LP. In this case
the state is real, but we might be able to arrange for it to behave
just like the simulated state in PARLOG++. Then we could pretend that
the state is just simulated, and reason about the language as if it
had full logical semantics. If the illusion is perfect then the
language really will have logical semantics!

More information about the Self-interest mailing list