Logtalk 3.73.0 – Object-oriented logic programming language.

Logtalk is an Open-Source, object-oriented logic programming language that extends and leverages the Prolog language with a feature set suitable for programming in-the-large.

Logtalk supports modern code encapsulation and code reuse mechanisms without compromising the declarative programming features of Prolog. Logtalk is implemented in highly portable code and can use most modern and standards compliant Prolog implementations as a back-end compiler. The Logtalk distribution features portable libraries and portable assertions, documenting, diagraming, and unit testing tools, plus extensive code editing and publishing support. It also includes extensive documentation and a large number of programming examples.

Logtalk compiler and runtime

Added: Linter warnings for deprecated arithmetic functions.
Added: Linter warning for comparing numbers using unification.
Added: Linter warnings for Quintus Prolog predicate versions of arithmetic functions.
Added: Additional legacy built-in predicates for linter deprecated warnings.
Added: Support for using backend-declared deprecated built-in predicates in linter warnings.
Improved: When checking the availability of predicates in user for uses/2 and use_module/2 directives, also check for an imported_from/1 predicate property.
Improved: Avoid false positive linter warnings about non-terminals called as predicates when the caller is a phrase-like predicate declared in the backend adapter file. Thanks to Yurii Rashkovskii for the use-case report.
Improved: Compiler reporting of term-expansion errors to write the source term.
Fixed: Unknown and undefined predicate call warnings when the calls occur in an included file to report the actual location instead of the main file.
Fixed: Only print linter warnings related to grammar rules when the flag grammar_rules is set to warning.

Prolog adapter and integration files

Changed: B-Prolog support status to “experimental”. Bugs and limitations on atom representation result in silent failures when loading libraries and tools.
Added: Support for declaring phrase-like predicates that call non-terminals. This helps preventing false positive linter warnings of non-terminals called as predicates.
Added: Support for declaring deprecated built-in predicates (with or without advised alternatives) in the adapter files.
Improved: ECLiPSe definition of the ‘$lgt_current_module_predicate’/2 internal predicate.
Updated: The CxProlog adapter file to require version 0.98.2 or later.
Updated: The LVM adapter file to prevent a clash with the term_hash/4 built-in predicate introduced in an upcoming version.
Updated: The SWI-Prolog adapter file to load the prolog_evaluable library when available (provides the evaluable_property/2 predicate used by the linter).

Documentation

Improved: Handbook grammar section now uses W3C-style EBNF syntax compatible with the Railroad Diagram Generator. Several typos and omissions are also Fixed. Thanks to Domingo Alvarez Duarte for his contribution and bug report.
Improved: Handbook section on parametric objects.
Improved: Documentation of the wrapper tool.
Updated: The manual installation instructions on generating documentation human-readable formats.
Updated: The man page for the lgt2pdf shell script.

Library

Removed: The tsv object from the csv library.
Added: Experimental mutations library for generating random mutations of terms of selected types. Intended for eventual fuzz testing support.
Added: New tsv library for reading and writing TSV files.
Added: Library predicates list::occurrences/2-3 to count the number of occurrences of list elements.
Added: Library predicate numberlist::least_common_multiple/2.
Added: Predicates select/4, swap/2, and swap_consecutive/2 to the random library for returning a random member of a list, replacing it by a new element and returning the resulting list, and for swapping two randomly chosen elements of a list.
Added: Non-terminals zero_or_more//2, one_or_more//2, and without//2 to the sequence_grammars library object.
Improved: Performance of the reader library predicates that read a file or a stream to a list of chars, codes, or bytes.
Improved: Performance of the term_io library predicates.
Updated: The csv library to also recognize .tab file extension for TSV files.
Fixed: The documentation of the pairs::keys_values/3 library predicate.
Fixed: The os library tests calls to the shell/1 predicate from auxiliary predicates.
Fixed: The listing library category implementation of the listing/1 predicate.
Fixed: The sequence_grammars library object definition of the non-terminals zero_or_more//0-1 and one_or_more//0-1 to consume tokens eagerly.

Tools

Updated: The lgtunit tool to also print the tests runtime in seconds.
Updated: The tutor tool for the new arithmetic function linter warnings and the new linter warning for comparing numbers using unification.
Fixed: The debugger tool checking for a deterministic goal for CxProlog.
Fixed: The lgtunit tool definition of the deterministic/1-2 predicates for CxProlog.
Fixed: The logtalk_tester scripts to detect and report as broken test sets where the tests failed to run due to an unexpected loading error likely caused by a backend bug.
Fixed: The lgt2html.ps1, lgt2md.ps1, lgt2rst.ps1, and lgt2txt.ps1 PowerShell scripts to release the lock on the XML files after converting them to reStructuredText files.
Fixed: Error in the wrapper tool when printing missing directives advice.

Examples

Added: New haunted_wasteland example, providing a solution for the Advent of Code 2023 Day 8 problem.
Added: New scratchcards example, providing a solution for the Advent of Code 2023 Day 4 problem.
Added: New trebuchet example, providing a solution for the Advent of Code 2023 Day 1 problem.
Added: Tests to the poem, profiling, and self_vs_this examples.
Updated: The errors example for the new arithmetic function linter warnings.
Updated: The bench example to remove dependency on the deprecated name/2 built-in predicate and eliminate all linter warnings.
Fixed: The bench example to always load the boyer and chat_parser benchmarks and to also run by default the flatten benchmark.
Fixed: The benchmarks example not loading the module.pl file from the loader_events.lgt and loader_no_events.lgt files when using Tau Prolog.

Tests

Added: Additional tests for the phrase/2-3 built-in methods.
Fixed: Test for the setof/3 built-in method.

Installers and installation scripts

Updated: The macOS installer to add /opt/local/bin to the default system PATH environment variable, /opt/local/man to the default system MANPATH environment variable, and /opt/local/share/info to the default system INFOPATH environment variable.
Updated: The macOS installer to inform the user about the additions to the PATH, MANPATH, and INFOPATH environment variables.
Fixed: The logtalk_user_setup.ps1 PowerShell script to use a valid path for the backup directory.

Compatible Prolog compiler

Download Now]]>