Hi Kim,
very different
Prolog implementations exist. Only some of them are modular within a framework of object-oriented programming.
Visual Prolog gives a fine example of objects and modules in a programming language. It comes with a programming environment for developing programs. The environment presents the files containing object types, modules, and else program parts in a
tree.
There is a free version of Visual Prolog available for
download. The Prolog language is identical in the free and commercial version, the free version is limited to build 32-bit applications only.
See the
Hello World! demonstration. When you follow the steps shown in the video (the current Visual Prolog version differs very little), you get a -simple- program which contains objects and modules. Class
main in file
main.cl is for example a module, i.e. the class states no construction type. Interface
time in file
time.i, which you find in pfc ("Prolog Foundation Classes"), is an object type. The interface is not used in the main code of the "Hello World!" example, but the package of the
time class is required by the surrounding code which calls the main code
run predicate.
Comprehensive details of Visual Prolog's object model are covered by the
Language Reference and in the
Introduction to Classes and Objects tutorial. In the Language Reference you can also find
example code of using objects.