Logtalk

Open source object-oriented logic programming language
Download

Logtalk Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Freeware
  • Price:
  • FREE
  • Publisher Name:
  • Paulo Moura
  • Publisher web site:
  • http://logtalk.org/
  • Operating Systems:
  • Mac OS X 10.4 or later
  • File Size:
  • 715 KB

Logtalk Tags


Logtalk Description

Open source object-oriented logic programming language Logtalk is a mature Open Source object-oriented logic programming language that can use most Prolog implementations as a back-end compiler. Here are some key features of "Logtalk": · Predicate directives (declarations) may be contained inside protocols (interfaces), which may be implemented by any object. · Object names can be compound terms containing free variables that can be used to parametrize object predicates. This allows us to treat any predicate as an instantiation of a parametric object. I.e. through parametric object we can associate any number of methods with a compound term. · You may have, in the same application, class-based hierarchies (with instantiation and specialization relations) and prototype-based hierarchies (with extension relations). Moreover, fundamental language features such as protocols (interfaces) and categories (components) can be used simultaneously by classes, instances, and prototypes. · No need to be constrained to a single, lengthy hierarchy rooted in some generic object. · Logtalk supports private, protected, and public inheritance in a way similar to C . Moreover, any entity relation can be qualified using a scope keyword. E.g. an object can privately implement a protocol, thus making all protocol declared predicates private. · Set the scope of your object predicates to match your protocol design and let the runtime system enforce your choices. · 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. · Any static object may contain both static and dynamic predicates. · Logtalk uses standard Prolog syntax with the addition of a few operators and directives for a smooth learning curve. Prolog code can be easily encapsulated inside objects with little or no changes. Moreover, Logtalk can transparently interpret most Prolog modules as Logtalk objects for easy reusing of existing code (e.g. libraries). · 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 of code reuse. · High level multi-threading programming is available when running Logtalk with selected back-end Prolog compilers, allowing objects to support both synchronous and asynchronous messages. Easily take advantage of modern multi-processor and multi-core computers without bothering with the details of creating and destroying threads, implement thread communication, or synchronizing threads. · 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, Logtalk supports both static binding and dynamic binding (with method lookup caching), greatly improving performance. Benchmark results for some Prolog compilers are available here. · Logtalk is designed for smooth integration with any Prolog compiler that conforms or closely follows the ISO Prolog Standard. · Logtalk interfaces with a specific back-end Prolog compiler via a minimal configuration file making it compatible with almost any modern compiler. · 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. Requirements: · Prolog What's New in This Release: · Added support for using the {}/1 compiler bypass Logtalk control construct to wrap closures that should be executed within the context of the pseudo- object "user" (e.g. calls to Prolog built-in predicates). · Workaround module meta-predicate semantics in order to support calls to module meta-predicates specified in use_module/2 directives within objects and categories. · Added support for compiling calls to module meta-predicates that are explicitly qualified (may require that the modules are loaded, depending on the back-end Prolog compiler). · Code cleanup of meta-predicate directives compilation. Tighten checks of meta-predicate directives and meta-predicate directive arguments. · Improved compilation of call/2-N goals. · Improved performance of meta-calls that are compiled at runtime. · Improved performance of the lambda expression Free/Goal, usually used in bagof/3 and setof/3 calls. · Improved lambda expression error-checking and added support for using a (>>)/2 lambda expression as a goal. · Corrected a bug in handling the meta-call context for lambda expressions. · Corrected a typo in the exception term generated when sending a message to an object corresponding to a built-in local method. · Updated the CxProlog config file in order to set write term and write list limits that allow compilation of the Logtalk libraries and examples (the default values are two low in some cases leading to compilation errors). In addition, take advantage of the new "version_data" flag, thus requiring version 0.97.4 or a later version. · Updated the SWI-Prolog config file in order to recognize and compile the proprietary directive at_halt/1. · Updated the B-Prolog config file in order to add a missing meta-predicate declaration for the proprietary foreach/2 built-in predicate. · Updated the YAP config file by adding a missing declaration for the time/1 proprietary built-in meta-predicate and by commenting out setting the call that sets the "language" flag to "iso" due to all the YAP libraries that don't compile with this setting. · Updated the XSB config file by adding a missing declaration for the time/1 proprietary built-in meta-predicate and a definition for the predicate setup_call_cleanup/3 (in order to restore compatibility with the Logtalk multi-threading features). · Updated all config files with information on the availability of the setup_call_cleanup/3 predicate. · Expanded the "lambdas" example with a contribution by Artur Miguel Dias, more sample queries (including non-deterministic ones), and some simple benchmarks. · Added syntax coloring support for the ^/2 existential quantifier operator for most supported text editors and syntax highlighters. Added sample code using the ^/2 existential quantifier to the syntax coloring test file.


Logtalk Related Software