Logtalk 2.28.2 reviewDownload
Logtalk is an open source object-oriented extension to the Prolog programming language
Logtalk is an open source object-oriented extension to the Prolog programming language. Integrating logic programming with object-oriented and event-driven programming, it is compatible with most Prolog compilers.
Logtalk supports both prototypes and classes. In addition, it supports component-based programming through category-based composition.
Here are some key features of "Logtalk":
Separation between interface and implementation
Predicate directives (declarations) can be contained inside protocols (interfaces), which can be implemented by any object.
Object names can be compound terms containing free variables that can be used to parametrize object predicates.
Support for both class-based and prototype-based systems
You may have, in the same application, class-based hierarchies (with instantiation and specialization relations) and prototype-based hierarchies (with extension relations).
Support for multiple object hierarchies
No need to be constrained to a single lengthy hierarchy rooted in some generic object.
Private, protected, and public inheritance
Logtalk supports private, protected, and public inheritance in a way similar to C++. Moreover, any entity relation can be qualified using a scope keyword.
Private, protected, and public object predicates
Set the scope of your object predicates to match your protocol design and let the runtime system enforce your choices.
Static and dynamic objects
Objects can be either static or dynamic. Static objects are defined in source files which are compiled and loaded in the same way as Prolog files. Dynamic object can be either defined in source files or created at runtime.
Static and dynamic object predicates
Any static object may contain both static and dynamic predicates.
A pre-processor so we can use standard Prolog syntax
Logtalk uses standard Prolog syntax with the addition of a few operators and directives for a smooth learning curve.
Predicates can be implicitly called when a spied event occurs, allowing programming solutions which minimize object coupling. In addition, events provide support for behavioral reflection.
Predicates can be encapsulated inside categories, which can be virtually imported by any object, without any code duplication and irrespective of object hierarchies. Thus, objects may be defined through composition of categories, which act as fine-grained units code of reuse.
Logtalk supports multi-inheritance of both protocol and implementation. An object may implement several protocols and extend, specialize, or instantiate several objects. Multi-inheritance conflicts are solved implicitly by the Logtalk lookup algorithms or explicitly by using predicate directives.
Logtalk code is compiled using the same technics that you use to write efficient Prolog code. In addition, method lookups are cached by the Logtalk runtime engine, greatly improving performance. Benchmark results for some Prolog compilers are available here.
Close integration with the ISO Prolog Standard
Logtalk is designed for smooth integration with any Prolog compiler that conforms or closely follows the ISO Prolog Standard.
Compatible with most Prolog compilers
Logtalk interfaces with a specific Prolog compiler via a minimal configuration file making it compatible with almost any modern compiler.
Automatic generation of XML documentation files
Logtalk automatically generates a documentation file in XML format for every compiled object, protocol, or category. The system includes all the necessary XSL(T) files and scripts to convert documenting files to (X)HTML and PDF.
Logtalk runs on almost any computer with a Prolog compiler (the main development environment is an Apple PowerBook G4 running MacOS X). The interface between Logtalk and a specific Prolog compiler is accomplished via a configuration file.
This file contains some Logtalk specific predicates and implementations for ISO Prolog standard predicates not available in the Prolog compiler.
In writing Logtalk I have tried to follow the Prolog ISO standard whenever possible. Capabilities needed by Logtalk that are not defined in the Part I of the ISO standard are:
access to predicate properties (dynamic, static, built_in)
Provided that your favorite Prolog has these capabilities mentioned above, making a configuration file is very easy. The Logtalk package already includes configuration files for the most common Prolog compilers. For optimal performance, Logtalk requires that the Prolog compiler supports first-argument indexing for both static and dynamic code.
Logtalk developement and testing is currently performed using the following Prolog compilers (in alphabetical order):
GNU Prolog 1.2.18
SWI Prolog 5.4.7
Because of that, these are probably your best choices for running Logtalk (providing that you are free to use one of these compilers).
In addition, Logtalk runs with little or no modifications with the following Prolog compilers (in alphabetical order):
ALS Prolog 3.1
Amzi! Prolog 6.22~7.x
B-Prolog 4.0, 5.0, 6.x
CIAO Prolog 1.10p5
LPA MacProlog32 1.25
LPA WinProlog32 4.0x
Open Prolog 1.1b10
Quintus Prolog 3.3~3.5
SICStus Prolog 3.8~3.12.x
What's New in This Release:
This release includes basic support for some more Mac OS X and Windows text editors, improves integration with SWI-Prolog, fixes a compiler bug, and provides support for easily creating PDF versions of the User and Reference Manuals (available as a separate download).
Logtalk 2.28.2 keywords