Logtalk

Software Screenshot:
Logtalk
Software Details:
Version: 2.44.1
Upload Date: 14 Apr 15
Developer: Paulo Moura
Distribution Type: Freeware
Downloads: 1

Rating: nan/5 (Total Votes: 0)

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.

Features:

  • Separation between interface and implementation:
  • Predicate directives (declarations) can be contained inside protocols (interfaces), which can be implemented by any object.
  • Parametric objects:
  • 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.
  • Event-driven programming:
  • 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.
  • Component-based programming:
  • 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.
  • Multi-inheritance support:
  • 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.
  • Good performance:
  • 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
  • YAP 4.5.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
  • BinProlog 8.x~10.x
  • B-Prolog 4.0, 5.0, 6.x
  • CIAO Prolog 1.10p5
  • ECLiPSe 5.5~5.8
  • IF/Prolog 5.x
  • JIProlog 3.0.1-2
  • K-Prolog 5.1.2a
  • LPA MacProlog32 1.25
  • LPA WinProlog32 4.0x
  • MasterProlog 4.1
  • Open Prolog 1.1b10
  • PrologII 4.5
  • QU-Prolog 6.7
  • Quintus Prolog 3.3~3.5
  • SICStus Prolog 3.8~3.12.x
  • XSB 2.6~2.7

What is new in this release:

  • Modified the message sending mechanism to call the "before" event handlers before performing the method lookup. This change should have no impact on existing code but allows some interesting applications (e.g. fail instead of throwing an exception when a message is not understood).
  • More consistent handling of compiler flags between setting flag values when compiling/loading a file and when using the set_logtalk_flag/2 built-in predicate: in both cases, setting the "smart_compilation" flag on will turn off the "clean" flag and setting the "clean" flag on will turn off the "smart_compilation" flag. Also, setting the "debug" flag on will turn off both the "smart_compilation" and "clean" flags.
  • Allows the soft-cut control construct, (*->)/2, when natively supported by the back-end Prolog compiler, to be used in the body of grammar rules (after a remark by Daniel Diaz while discussing GNU Prolog support for the soft-cut control construct).
  • Corrected a Logtalk compiler bug when the "source_data" flag is on with back-end Prolog compilers where is not possible to retrieve the position of a read term.
  • Corrected a bug in the compilation of the meta_non_terminal/1 directive where only the first meta-argument would be correctly processed.
  • Updated the ECLiPSe config file to detect when running on Windows 64 bits systems and to ignore non-predicate and non-operator exports when pre-processing lib/1 directives.
  • Updated the unit test framework to print more informative messages for failed unit tests.
  • Added predicate split/4 (for splitting a list into sublists with a given length) to the "listp", "list", and "difflist" library entities.
  • Updated the "cc" example with a definition for the shell/2 predicate for CxProlog.
  • Changed the names of the objects in the "mi" example to avoid a name conflict when running the example unit tests.
  • Corrected a bug in the Windows installer that prevented detection of YAP 64 bits versions. Thanks to Stepan Ipatov for the bug report.
  • Corrected a bug in the Windows installer that prevented users from customizing the installation directory. Thanks to Daniel Moniz for the bug report and to Gavin Lambert for diagnosing the bug.
  • Updated the Windows installer script for improved detection of XSB and to default to install only the per-user files when run by a non-admin user on a computer where Logtalk is already installed.
  • Added basic support for the LaTeX "listings "package. Added notes on the "minted" and "texmates" LaTeX packages.
  • Added notes on the Textastic iPad text editor.
  • Added basic syntax coloring and code folding support for the UltraEdit text editor.
  • Updated the TextMate bundle to disable the automatic indent corrections introduced in the development version of TextMate 2.0.

What is new in version 2.44.0:

  • Changed the semantics of complementing categories to allow patching both predicate declarations and predicate definitions of complemented objects. This is accomplished by ensuring that predicate declaration and definition lookups start at the complementing categories before looking into the complemented object itself or into its related entities.
  • Updated the Logtalk compiler in order to generate a warning when compiling a complementing category for a complemented object that was compiled with support for complementing categories turned off.
  • Corrected a bug in the processing of meta-calls for meta-predicates where the calling context would be set to "this" instead of "sender" whenever a meta-argument was one of the ::/2, {}/1,

What is new in version 2.43.3:

  • Changed the compiler to take into account the uses/2 directive when compiling calls to the reflection built-in methods. This change extends the semantics of the uses/2 directive and allows easier migration from plain Prolog applications to Logtalk.
  • Updated the implementation of the predicate_property/2 built-in method, adding a scope/1 property.
  • Updated the Logtalk compiler to add information about a source file name, source file directory, and source file compiler options to the generated Prolog files. In previous versions, this information was registered only when loading a source file. The changes simplify building applications where Logtalk libraries are pre-compiled and pre-loaded.
  • Updated the Logtalk compiler to print the name of the hook object used in the compilation of source files when the "hook" compiler flag is defined.
  • Updated the built-in debugger in order to avoid unnecessary choice points created by back-end Prolog compilers whose retract/1 implementation fails to take advantage of logical update semantics to make calls deterministic.
  • Corrected a bug in the Logtalk compiler runtime handler where it failed to decompile internal entity identifiers when throwing entity existence exceptions.
  • Updated the Lean Prolog config file, adding index/1 directives for some of the dynamic predicates used by the internal Logtalk runtime tables.
  • Updated the SWI-Prolog integration files to test for the availability of the index/1 directive, which is deprecated by the new experimental SWI-Prolog support for just-in-time multi-argument indexing.
  • Added predicates subsequence/4 (for generating subsequences of a list with a given length), substitute/4 (for replacing elements in a list), and hamming_distance/3 to the library "listp" and "list" entities.
  • Added euclidean_norm/2, chebyshev_norm/2, manhattan_norm/2, euclidean_distance/3, chebyshev_distance/3, manhattan_distance/3, and scalar_product/3 predicates to the library "numberlistp" and "numberlist" entities.
  • Corrected some silly bugs in the definition of the "character" library object predicates is_bin_digit/1, is_octal_digit/1, is_dec_digit/1, and is_hex_digit/1.
  • Updated the library "all_loader.lgt" loader file to also load the "meta_compiler_loader.lgt" loader file.

What is new in version 2.43.1:

  • Changed the compiler to take into account the uses/2 directive when compiling calls to the database built-in methods. This change extends the semantics of the uses/2 directive and allows easier migration from plain Prolog applications to Logtalk.
  • Added experimental support for using a predicate template as argument to the coinductive/1 directive. This template allows the specification of which arguments are meaningful for coinductive success. Based on similar functionality found on on Feliks Kluzniak's DRA meta-interpreter.
  • Improved support for debugging coinductive predicates when using the Logtalk built-in debugger.
  • Removed coinduction support for CxProlog. The current version of this compiler lacks a soft-cut built-in predicate or control construct, which is now required by the experimental coinduction implementation.
  • Lifted a long-standing limitation that prevented the user definition of wrapper predicates for the bagof/3 and setof/3 built-in methods whenever the goal argument may use the ^/2 existential quantifier.
  • Added support for the "^" meta-predicate meta-argument mode specifier suggested by Jan Wielemaker and found on SWI-Prolog 5.11.25. This mode specifier is useful when defining wrappers for the bagof/3 and setof/3 built-in methods whenever the goal argument may use the ^/2 existential quantifier.
  • Added "prolog_compiler" and "prolog_loader" compiler flags, which allow passing options to the back-end Prolog compiler built-in predicates that compile to disk and load a (compiled) Prolog flag. The default value for both flags is the empty list.
  • Corrected a bug when compiling calls to Prolog proprietary built-in meta- predicates where the Logtalk compiler could attempt to process non meta- arguments as goals. This bug only manifested itself with some back-end Prolog compilers such as ECLiPSe.
  • Corrected a bug in the processing of conditional compilation directives.
  • Corrected a bug that prevented passing alias/3 directives on calls to the create_object/4, create_category/4, and create_protocol/3 built-in predicates.
  • Removed from the built-in object "logtalk" the decompile_predicate_head/4 and decompile_predicate_indicator/4 deprecated methods.
  • Removed support for the long deprecated Logtalk metapredicate/1 directive.
  • Corrected a performance bug when caching calls to category predicates where the cached entries could be more specific than necessary when working with parametric categories.
  • Improved caching of "super" calls from within prototypes. Previously, all cached entries would be specialized by the value of "self" in order to properly deal with the special cases where an object both instantiates and specializes other objects.
  • Updated the Logtalk compiler to activate any operator declarations found on predicate scope directives during the compilation of the entities that contain the directives.
  • Improved the performance of coinductive predicates when using back-end Prolog compilers such as SICStus Prolog that don't provide the soft-cut control construct but provide the soft-cut built-in meta-predicate (if/3).
  • Corrected a bug where a spurious report of compilation/loading warnings could be printed when a source file was compiled/loaded with the compiler flag "report" turned off.
  • Added a "streamvars" library object, derived from the existing "assignvars" library category, featuring support for adding and retrieving terms (which may be variables) from a "stream" variable.
  • Updated the "coinduction" example, taking advantage of the enhanced coinductive/1 directive and broadening the number of individual examples that can be run using SICStus Prolog. Added a model checking example, using coinduction, coroutining, and constraints, contributed by Neda Saeedloei.
  • Updated the "metapredicates" example with sample code illustrating how to define wrappers for the bagof/3 and setof/3 built-in methods when the meta-argument may contain existentially qualified variables.
  • Updated the "cc" example, correcting predicate definitions for several back-end Prolog compilers and adding some basic unit tests.
  • Updated the "encodings" example with limited support for Lean Prolog.
  • Added missing entries for the meta_non_terminal/1 directive and for the call//N non-terminal to the "help" example.
  • Added a parser for PDDL 3.0 files, contributed by Robert Sasak.
  • Added code folding support to the SubEthaEdit text editor. Added code folding support for conditional compilation blocks to the Kate, Vim, and TextMate text editors.
  • Updated the integration scripts in order to load the library paths file before loading the Logtalk compiler/runtime. This change aims to simplify loading of library and example files from the settings files. In addition, also look for the Logtalk installation directory in $HOME/share when the LOGTALKHOME environment variable is not defined. Thanks To VAtor Santos Costa for the suggestion.
  • Updated the Windows installer in order to support Lean Prolog and detect YAP 64 bits versions.

What is new in version 2.43.0:

  • Added experimental support for Lean Prolog.
  • Changed error reporting by the Logtalk compiler and runtime. All exception terms now use, whenever possible, the error(Error, logtalk(Goal, Entity))
  • format. Changed the internal error checking to use, whenever practical, the new '$lgt_must_be'/2-3 internal predicates.
  • Added an "optimize" flag, whose default value is "on". This flag allows the user to turn off existing optimizations for e.g. debugging tasks (the
  • currently implemented optimizations include the removal of redundant calls to true/0 from the body of compiled predicate clauses and the removal of
  • redundant calls to (=)/2 from the body of clauses generated by the expansion of grammar rules).
  • Added a "source_data" flag, whose default value is "on". With this flag set to "on", Logtalk will keep the information represented using mode/2,
  • info/1-2, uses/2, and use_module/2 directives plus source location data (including source file names and line numbers), useful both for debugging
  • and for integration with development tools. This flag can be turned off in order to generate more compact code. The parameter_names/1 object and
  • category property is removed in order to avoid redundancy.
  • Implemented protected/1 and private/1 properties for objects, protocols, and categories. Together with the public/1 property, these properties
  • allows the list of predicates declared in the entity to be accessed for reflective computations. Implemented declares/2, defines/2, includes/3,
  • and provides/3 properties for accessing the properties of predicates declared and defined within an entity. Declaration properties include line_count/1, the line number of the predicate scope directive. Definition properties include line_count/1, the line number of the head of the first
  • clause for the predicate, and number_of_clauses/1, the number of clauses for the predicate. Also implemented experimental uses/3 and use_module/3 properties.
  • Added a predicate property, redefined_from/1, allowing querying about the object or category that contains a predicate definition that is redefined.
  • Added a loaded_file/3 predicate to the "logtalk" built-in object, which complements the existing loaded_file/2 predicate and gives access to the
  • explicit options used when the file was compiled and loaded.
  • Implemented compiler support for the meta_non_terminal/1 directive and the call//N built-in non-terminal.
  • Simplified the compilation of grammar rules by removing the support for dealing with non-terminal scope and existence errors at the grammar rule
  • level instead of the predicate level. Although this feature could be helpful when debugging grammar rules, it complicated the integration of Logtalk with Prolog-native development tools.
  • Updated the Logtalk compiler in order to save the entity clause locations and make this information available to the back-end Prolog compilers.
  • Updated the Logtalk compiler in order to avoid generating unnecessary internal catchall clauses for the predicate declaration and definition tables for dynamic entities.
  • Updated the Logtalk compiler in order to preclude using multifile predicates for breaking object encapsulation. A primary declaration
  • entity must exist, containing both a scope and a multifile directive for the predicate. In addition, defining clauses for a multifile
  • Entity::Functor/Arity without a corresponding multifile/1 directive will now result in a compilation error instead of simply a warning.
  • Removed the Logtalk compiler restriction that forced discontiguous/1 and dynamic/1 directives to precede calls to the declared predicates.
  • Improved the Logtalk compiler report of misspelt calls to non-terminals in grammar rules.
  • Allow the use of the :/1 control construct on the body of grammar rules.
  • When debugging messages specified in uses/2 directives, the message is now printed implicitly qualified as in the source code written by the user.
  • Changed the internal predicates used in the implementation of the built-in multi-threading predicates in order to facilitate the integration with
  • high-level debugging tools that require decompilation of the generated Prolog code.
  • Corrected a bug introduced in Logtalk 2.42.4 on the compilation of entity predicates that call synchronized predicates. This bug resulted in calls
  • being made instead to the non-synchronized forms of the predicates, which would manifest in random failures of thread goals.
  • Corrected a long standing bug where a runtime-compiled meta-call within a category would be compiled as a call to a predicate of the object
  • importing the category instead as a call to a local category predicate.
  • Corrected a long standing bug where entity flag values set locally using the set_logtalk_flag/2 directive would fail to be saved into the entity
  • compiled code.
  • Corrected a long standing bug when abolish a dynamic predicate in a non-prototype object where the abolish/1 method would succeed without
  • the predicate being actually abolished.
  • Corrected a bug in setting the correct execution context when calling a meta-argument that requires a runtime compilation in the context of
  • "sender".
  • Corrected a bug in the compilation of explicit-qualified calls to module meta-predicates where the module qualification would be dropped from the
  • compiled call. Note that these calls will use Logtalk meta-predicate semantics (i.e. the meta-arguments will be called in the context of the
  • caller) instead of the usual Prolog module meta-predicate semantics.
  • Corrected a bug where the coinduction stacks was not initialized when using the

What is new in version 2.42.4:

  • This version includes compiler, runtime, and multi-threading performance optimizations, improves compiler error messages for the synchronized/1 and dynamic/1 directives, adds support for preserving operator scope information and outputting this information to the automatically generated XML documenting files, adds new utility predicates to the logtalk object, improves several programming examples, includes a workaround for an SWI-Prolog uninstaller bug on Windows, and features portability updates for Qu-Prolog, SICStus Prolog, SWI-Prolog, XSB, and YAP.

What is new in version 2.42.3:

  • This version adds support for calling dynamic predicates in the context of "this" from within categories, adds support for pre-compiled clause heads, includes bugfixes and improvements to the built-in debugger, includes improved libraries and examples, adds support for indexicals when using the SICStus Prolog CLP(FD) library, adds an experimental example of using attributed variables within objects and categories, and features portability updates for ECLiPSe, GNU Prolog, SICStus Prolog, and SWI-Prolog.

What is new in version 2.42.2:

  • This version improves the compilation of calls to module predicates, improves checking of meta-arguments in meta-predicate calls, improves support for lambda expressions, includes an optimizing compiler for calls to library meta-predicates, adds new libraries for logging events, working with temporal interval relations, and using integer counters, improves existing examples and libraries, adds support for using the JavaScript-based SyntaxHighlighter package, and features portability updates for GNU Prolog, Qu-Prolog, SICStus Prolog, SWI-Prolog, and XSB.

What is new in version 2.42.1:

  • This version adds support for new meta-predicate mode indicators, enabling support for more Prolog proprietary built-in meta-predicates.
  • Support was added for detecting and reporting missing dynamic/1 and discontiguous/1 directives.
  • A new lint flag was added.
  • Two meta-predicate compilation bugs were corrected.
  • Some of the examples were updated.
  • Portability updates were made for B-Prolog, SICStus Prolog, SWI-Prolog, XSB, and YAP.

Other Software of Developer Paulo Moura

Logtalk
Logtalk

11 Mar 16

Comments to Logtalk

Comments not found
Add Comment
Turn on images!