[comp.object] Implementing Prolog in OOPS

px@fct.unl.pt (Joaquim Baptista [pxQuim]) (06/11/91)

[I added comp.object to the list of newsgroups.]

In article <pboysen.676590008@du248-03.cc.iastate.edu>
pboysen@iastate.edu (Boysen John Peter) writes:

   Has anyone had experience implementing a prolog interpreter in an
   object-oriented language?  I am in the process of doing so and have some
   questions about variable bindings and finding all solutions.  Any help
   would be appreciated.

Smalltalk/V from Digitalk, Inc, which runs on PCs and Macintoshes (at
least), includes a Prolog compiler written entirely in Smalltalk. They
translate prolog-like code into Smalltalk/V code, and add a browser
for Prolog code.

The implementation is not fast, but its main goal was to provide logic
facilities from within Smalltalk.  Prolog is fully integrated with
Smalltalk, in that you can mix both languages: Smalltalk/V can use
Prolog through the "all solutions" and "first solution" predicates;
Prolog predicates can mix calls to Prolog with calls to Smalltalk
methods.

Note that the version of Prolog implemented is a bit odd, since they
added some weird facilities that were easy to implement on
Smalltalk/V.

Conclusion: if you want a little logic inside Smalltalk, its perfect.
Otherwise, you probably want to take a decent Prolog and add
object-oriented features (like Prolog++ from LPA).

Some recent publicity in the Newsletter of the ALP says:

Prolog++ provides a complete OOP language with objects, instances,
methods and attributes which supports multiple inheritance, message
cascading and has full access to Prolog.  To aid program development
there is an object inspector and a graphical hierarchy browser.

Contact: Clive Spencer, Marketing Director, LPA, Studio 4, RVPB,
Trinity Road, London, SW18 3SX, UK

Disclaimer: I have no connection with LPA, I ain't even a happy user!

----
Joaquim Baptista, aka px@fct.unl.pt, px@unl.uucp
Snail: CRIA, UNINOVA, FCT/UNL, 2825 Mt Caparica, Portugal

So long, and thanks for all the fish.