Did you know ... Search Documentation:
Title for pldoc(default)
Branch: stable (switch to development),
version to version

SWI-Prolog Changelog from version 9.0.4 to 9.2.0

[Jan 31 2024]

  • ADDED: library(dom) (WASM version) bind/4: allow passing JavaScript objects.
  • FIXED: Qlf file generation for :- include(File) The include statements can come in more places, even in the middle of a predicate. This changes the identifier from 'I' to 'L' to make the statement unique in all contexts and defines handling the include statements.

    Updates the qlf save vesion to 69. Old valid version 68 files can still be loaded.

[Jan 30 2024]

  • MODIFIED: `swipl qlf` app to use sub commands. Now use e.g. `swipl qlf compile file.pl`
  • FIXED: pack_install/2: install from archive without git.
  • FIXED: Avoid confusion about -o, -x, -b and -c options These options are used early in the initialization and were detected using dedicated option processing. This goes easily wrong. Therefore we now use the full option processor. If we loaded a state that includes options, we redo the option processing.

[Jan 29 2024]

  • ADDED: swipl qlf app: --include for compilation to include user files.
  • FIXED: pack_install/2: may try to delete old pack twice.
  • FIXED: pack_install/2 from an archive file.
  • PORT: Re-enable gmp for MacOS binaries. For some versions using gmp in the app crashed. Seems these issues are resolved.
  • PORT: Re-enable gmp for MacOS binaries. For some versions using gmp in the app crashed. Seems these issues are resolved.

[Jan 26 2024]

  • PORT: Updated MacOS dependencies to their latest stable version

[Jan 29 2024]

  • PORT: Fix MacOS bundle fixup The Qt bundle fixup fixes too much, so we first move our modules away.
  • PORT: Install CMake exports inside the bundle

[Jan 28 2024]

  • PORT: Updated MacOS versions of the maintenance scripts.

[Jan 29 2024]

  • FIXED: WASM: returning an array of objects. Reported by @mjano314 on Discourse.
  • PORT: Fix MacOS bundle fixup The Qt bundle fixup fixes too much, so we first move our modules away.
  • PORT: Install CMake exports inside the bundle
  • FIXED: WASM: returning an array of objects. Reported by @mjano314 on Discourse.

[Jan 28 2024]

  • PORT: Updated MacOS versions of the maintenance scripts.

[Jan 26 2024]

  • ENHANCED: Installing packs in an explicit directory creates this dir.
  • ENHANCED: Installing packs in an explicit directory creates this dir.
  • PORT: Updated MacOS dependencies to their latest stable version
  • TEST: Add help to test.pl option handling. Added --output=always to force emitting all test output.
  • FIXED: Invalid PlDoc comment.
  • ENHANCED: argv_usage/1: deal witn oneof(Values) types.
  • TEST: Add help to test.pl option handling. Added --output=always to force emitting all test output.
  • FIXED: Invalid PlDoc comment.
  • ENHANCED: argv_usage/1: deal witn oneof(Values) types.
  • RELEASE: Preparing 9.2.0. Merged devel at 4803519071d94771a48322d77739118d0e211adf
  • TEST: Created answer subsumption test from #1222
  • FIXED: require_prolog_version/2: accept dirty on release tag/.

[Jan 25 2024]

  • MODIDIED: library(prolog_pack) This is an extensive rewrite of the package infra structure. The pack format has not changed. A brief summary of the changes:
    • Plan the installation of multiple packages, selecting a compatible combination.
    • Plan the installation, including dependencies before installing anything, first asking consent from the user. On accept, the packs are downloaded and the build process is established.
    • Easily support installing packs specifically for a project in addition to user and system-wide packs.
    • More informative listing of packs, including listing only outdated packs.
    • More work on the app pack.

[Jan 21 2024]

  • ADDED: swipl pack list: --installed option.

[Jan 19 2024]

[Jan 24 2024]

[Jan 19 2024]

  • ADDED: Prolog flag rationals to claim rational number support.

[Jan 18 2024]

  • ADDED: cov_property/1 Allows querying coverage collection system properties (currently only whether coverage data collection is active).

[Jan 17 2024]

  • FIXED: #1222 answer subsumption pruning of answers may crash.
  • ADDED: library(prolog_coverage). This used to be available as library(test_cover) from the plunit package.

[Jan 16 2024]

[Jan 14 2024]

  • MODIFIED: Moved pack_attach/2 from the library to the core. This predicate is not about installing. This patch also deletes '$pack_attach'/1 and '$pack_attach'/2.
  • ADDED: library(git): is_git_hash/1.

[Jan 13 2024]

  • FIXED: #1220 create_prolog_flag/3 using type(term), keep(true) If the initial type is not a term, the type must be set to term and the value must be converted.

[Jan 12 2024]

  • ADDED: pack_install_local/3 This predicate adds one or more packs to the local project directory. Work in progress.
  • ADDED: Prolog environment variable SWIPL_PACK_PATH This defines the Prolog search path for packs at startup.
  • ADDED: Prolog flag path_sep. Provides access to OS path separator (: or ; for Windows).
  • ADDED: replace(+Bool) option to attach_packs/2. Allows attach_packs/2 to clear the default package list.

[Jan 11 2024]

  • FIXED: Make sure saving the environment always succeeds
  • ADDED: Allow installing git packs from a URL whose base name does not match the pack name

[Jan 10 2024]

  • ENHANCED: Improve listing of packs
  • ADDED: pack_list/2 List packs with options.

[Jan 8 2024]

[Jan 9 2024]

  • DOC: Succeed if there is no profiling support in this version.
  • FIXED: Keep track of base and size of the C-stack This information was stored in the thread-info structure. However, if an engine is detached and later attached in a new OS thread this information is wrong. We now cache it in the info structure, but we store it in a pthread key.

    This notably fixes thread interaction for JPL.

[Jan 8 2024]

  • ENHANCED: always save buildenv.sh on pack build directory.
  • ADDED: swipl_add_test() to home/cmake/swipl.cmake
  • ADDED: Set ${swipl_module_dir} in home/cmake/swipl.cmake
  • FIXED: CMake error in home/cmake/swipl.cmake.
  • DOC: #1217 Improve documentation for selecting Python version.
  • BUILD: Disable Janus when using -DSTATIC_EXTENSIONS=ON

[Jan 5 2024]

  • FIXED: Avoid PL_thread_attach_engine()/PL_thread_destroy_engine() destroying the thread. If this pair is called on a thread that already exists, it should not destroy the engine. This notably causes Janus to crash when running on a background thread. Reported by Fabrizio Riguzzi.

[Dec 29 2023]

  • FIXED: Use snapshot/1 when computing exports This is used to update the autoload library as well as several other IDE related tasks. For this we read and expand the file until we find the first non-directive. This may however leave traces in dynamic predicates. Using snapshot/1 avoids that.

    It is a partial work around. There could be other side-effects. Should probably be considered experimental.

  • FIXED: Declare more system dynamic predicates as not being subject to transactions. This fixes several issues when (auto)loading sources files inside snapshots (snapshot/1) or discarded transactions.

[Dec 28 2023]

  • FIXED: #1213 transactions interfering with wrap_predicate/4. More generally, transactions and snapshots should not affect some system maintained dynamic predicates. The wrapper used by wrap_predicate/4 is one example. This also affects dynamic predicates involved in loading sources. This patch disconnects whether predicates are subject to transactions from whether they are dynamic.

    For now, the ability to separate the two properties is reserved to the system.

[Dec 27 2023]

  • FIXED: Consistency of LD and CC variables for building packages.
  • BUILD: Use static libraries to silence Windows Defender It appears that executables cannot be copied when Windows Defender is active.

[Dec 22 2023]

  • BUILD: Use CMake recommended CMAKE_C_BYTE_ORDER when available

[Dec 27 2023]

  • ENHANCED: Allow for some rounding and jitter when deciding INDEX.pl is out-of-date.

[Dec 21 2023]

  • TEST: Make test_installation/0 run package tests concurrently.
  • CLEANUP: document many of the maintenance scripts and remove some outdated ones.

[Dec 20 2023]

[Dec 19 2023]

  • ADDED: library(prolog_colour): colorized known but unset flags.
  • ADDED: library(prolog_colour): support arithmetic function roundtoward/2. Second argument is not a function but a rounding mode identifier.
  • ADDED: arithmetic_function/1 to allow import/export If the implementation of a function is exported, it may be imported into another module and used. This patch also updates the documentation.
  • FIXED: pretty_print/2 to deal with bobs around an operator.
  • DOC: PL_new_term_refs() takes size_t since recently.

[Dec 18 2023]

  • FIXED: Fixup script for MacOS bundle was not executed. Seems a change in recent CMake that requires the script to start with #!.

[Dec 15 2023]

[Dec 14 2023]

[Dec 13 2023]

  • MODIFIED: translate_bindings/5 to name the variables. Supports named variables in SWISH.
  • INSTALL: #1209 Fixed missing manindex.db during intallation.

[Dec 12 2023]

  • DOC: Get profiler/2 and related docs from PlDoc rather than LaTeX
  • ENHANCED: When emitting a document, consider text already on the current line.
  • ADDED: opt_usage/1: allow for multiple opt_help(help(usage), Usage) This allows to present multiple usage lines.
  • ADDED: app qlf This app simplifies commandline driven management of QLF files. Use `swipl qlf -h` for help. The command line syntax is still unstable.

[Dec 11 2023]

  • FIXED: Recompile or ignore incompatible QLF files An incompatible VM signature caused loading of a QLF file to result in a warning, loading nothing. It now prints a message and recompiles the file.
  • ADDED: check_installation/0 to verify there are no ambiguities in the autoload index.

[Dec 9 2023]

[Dec 8 2023]

  • MODIFIED: Install each extension in library/ext/dir This allows adding and removing extensions without rebuilding the library index and clarifies the source of files. This was introduced to simplify adding and deleting optional components in e.g., the Windows installer or package managers that split SWI-Prolog into multiple packages such as used by Debian and planned for Conda.

[Dec 6 2023]

  • FIXED: Toplevel calls repl_loop_hook/2 with a variable.
  • FIXED: Choice point left by loading the personal init file.

[Dec 4 2023]

  • FIXED: format_types/2: error on backracking This predicate left a choice point and on backtracking produced an error when analyzing format strings that contain a *.

[Nov 30 2023]

  • ADDED: Experimental repl_loop_hook/2 hook This allows acting on entering/leaving interactive mode.

[Nov 29 2023]

  • DOC: Improve `swipl --help` (list "app" mode)
  • SANDBOX: Declare flag write_attributes as safe. This may call portray, but local definitions are verified and global definitions cannot be changed.
  • CLEANUP: Move installation locations to cmake/Locations Moving it into a separate file keeps the main file short and it needs to be before Ports because we need to act on them. Possibly though, we need part of the locations before and part after the Ports? As is, that does not seem to be the case. Alternatively we could move part of this into the Port files?

[Nov 28 2023]

  • PORT: Allow for not having a compiled-in "home" directory Conda has no sensible fixed installation location.
  • FIXED: check_installation not to bail out if a feature test raises an exception.
  • CLEANUP: Moved default definition for file_search_path/2 foreign to library(shlib). This simplifies maintenance. The change also adds swi(lib/Arch) for all platforms, although the default SWI-Prolog for Windows installs the libraries in swi(bin). Possibly we can change that too?

[Nov 27 2023]

  • INSTALL: Allow installing in public directory without symlink For some installations we want the executables in another directory than the "home". Normally these were POSIX systems and we would symlink from the executable to the real location in the self-contained binary.

    But, also some Windows installations such as MSYS2 and Conda (and probably Cygwin) want this. Therefore we added SWIPL_INSTALL_AS_LINK which, if OFF, compiles the relative path to the anticipated home into the binary such that we can install the .exe in a separate directory (for Windows along with the DLLs needed to run them).

[Nov 23 2023]

  • CLEANUP: format_types/2 Remove not-working attempt to make it bi-directional. It now properly raises an instantiation error, causing sandbox analyis to work without breaking anything.

[Nov 21 2023]

  • FIXED: Conditional compilation and :- include/1. Avoid errors on
    :- if(...).
    :- include(...).
    :- elif(...).
    ...

[Nov 19 2023]

  • ENHANCED: Shorten and simplify calling deterministic foreign functions This patch unifies I_FOPEN with the subsequent calling function and somewhat simpifies the design.

[Nov 18 2023]

[Aug 18 2023]

  • SECURITY: CVE-2023-45853 Upstream bug in the minizip library used to create and load Prolog saved states. Not very relevant to SWI-Prolog as it unlikely that SWI-Prolog is used in a way that provides uncontrolled access to the involved parameters.

    Upstream message:

    Reject overflows of zip header fields in minizip.

    This checks the lengths of the file name, extra field, and comment that would be put in the zip headers, and rejects them if they are too long. They are each limited to 65535 bytes in length by the zip format. This also avoids possible buffer overflows if the provided fields are too long.

[Nov 15 2023]

[Nov 16 2023]

  • MODIFIED: set_prolog_flag/2: convert Booleans If set_prolog_flag/2 is used to create a new flag and the value is an atom that is recognised as a Boolean, normalise the value.
  • ADDED: must_be/2 and friends: constructed types and compounds Allow for e.g. compound(atom-integer) to express a pair mapping an atom to an integer. Also introduces constructed types such as (atom;integer)

[Nov 15 2023]

  • FIXED: #1205: sandbox:format_calls/3 to handle non-list format args correctly.
  • ADDED: Provide a mechanism to warn on unused Prolog flags
  • ADDED: Allow -Dno-flag
  • MODIFIED: library(apply_macros) flags Now listens to optimise_apply, which defaults to optimize, while the flag apply_macros_scope defines whether the optimization applies to the files that import this library or all files (default).
  • CLEANUP: Make optimise_debug flag library-only.
  • MODIFIED: Renamed Prolog flag clpfd_goal_expansion to optimise_clpfd Improves consistency
  • FIXED: Source position preservation of string tereminals in DCG.
  • ADDED: Rewrite positions for function evaluation in meta-predicate arguments This fixes source location handling for clauses that call a meta-predicate where one of the non-meta arguments uses e.g. Dict.attr.
  • FIXED: clause_info/4: perform full body matching.

[Nov 14 2023]

  • FIXED: Clause position handling of plunit test/1,2 clauses.
  • FIXED: '$notrace'/2 + '$restore_trace'/2 pair to properly restore This pair now reliably restores LCO and VMI instruction optimization such that e.g., the coverage tools work properly after this pair is called.
  • ENHANCED: load library(apply_macros) globally on -O.
  • FIXED: #1204: undo/1: crash if a single undo is scheduled that fails.

[Nov 13 2023]

  • FIXED: clause_info/5 for unification moved into the head
  • FIXED: clause/2: moved unifications If a unification is moved into the head and the variable is unified against some other variable, we must move the unification back.
  • MODIFIED: Control transformations by library(apply_macros). The new Prolog flag apply_macros controls when this library rewrites the code. Values are true (old default), false (no-op), optimise (only wwith -O) and imported (only apply to modules where it is explicitly imported to).
  • ADDED: Process -Dname=value to set Prolog flags.
  • FIXED: tracer S command to save the current goal. Reported by Wolfram Diestel (https://swi-prolog.discourse.group/t/stacktrace-after-hitting-t-s-u-while-browsing-through-query-solutions/6963/2)
  • PORT: MSVC install: there is no libswipl.ddl.a.

[Nov 7 2023]

  • PORT: Windows: deal with OpenSSL when using per-module CRT support.

[Nov 6 2023]

  • ADDED: Swin_open_osfhandle()
  • PORT: Fixed integer addition overflow check when using MSVC
  • PORT: Allow using Windows HANDLE in communicating about Prolog streams.
  • BUILD: Make installation work again Broken with 71caaeb72188627f0d717d251cab14d3e557a241

[Nov 5 2023]

  • BUILD: Simplify forced building of the library indices.
  • PORT: Improve support for Conda on Windows. Adds a flag conda. Windows versions added %CONDA_PREFIX%\Library\bin and %PREFIX%\Library\bin to dependent DLL search path. This extends a similar work-around for MSYS2.

[Nov 2 2023]

  • DOC: Non-ISO behavior of \+/1
  • PORT: Use uint64_t for LibBF mpz_ui_pow_ui() Switch to using the 64 bit versions on all platforms. Requires some more 64 bit init/set versions, but overflow checking intrinsic __umulh() for MSVC only exists of 64 bit.
  • FIXED: gcd function for LibBF on platforms with 32 bit long.
  • FIXED: mpz_ui_pow_ui() emulation on LibBF on systems with 32 bit long. Breaks e.g. A is 2^65, succeeding with A = 0.
  • ADDED: PL_get_delay_list() API.

[Nov 1 2023]

  • CLEANUP: PL_new_term_refs() now takes size_t argument (was int).
  • DOC: Fix return types of Sfread() and Sfwrite() (size_t instead of int)

[Oct 29 2023]

  • ADDED: Start applications using swipl app-name [arg ...]
  • CLEANUP: Code and docs for '$initialise'/0 that starts the system

[Oct 31 2023]

  • FIXED: Issues with name/2 and number_codes/2 high Unicode points on Windows. Also fixes issues with code strings holding 0 codes for these predicates.
  • FIXED: After converting text representation it may no longer be canonical. This causes name/2 on a string that starts with a digit and contains wide characters to re-interpret UTF-8 and wide characters.
  • ENHANCED: pack_install/2: duplicate handling Allow installing a package in a given directory if the package is already installed in some other directory.
  • MODIFIED: pack_install/1,2: enforce TLS certificates From this version the system by default verifies TLS certificates. For poorly configured servers there is an option insecure(true) to pack_install/2 to skip the verification.
  • FIXED: downcase_atom/2 and upcase_atom/2: error handling.
  • DOC: PrologScript and shell script usage

[Oct 25 2023]

  • XSB: Reorganise dialect emulation libraries Make timed_call/2 and consult/1 available from the right modules.

[Oct 24 2023]

  • FIXED: html to text translation float right This patch fixes handling of inline style float:right and dealing with multiple flush-right elements in a block.

[Oct 23 2023]

  • FIXED: undo/1: calling hooks while backtracking could corrupt choicepoint. Reported by Fernando Saenz Perez.
  • FIXED: PL_get_size_ex() on 64 bit systems using LibBF based bignums.

[Oct 18 2023]

  • ENHANCED: help/1: keep track of modules for user predicates Also show private predicate matches.
  • TEST: Disable shared tabling tests conditionally. This test requires threads and library(time).

[Oct 16 2023]

  • MODIFIED: When using --no-signals, keep using the GC thread The communication with the garbage collection thread is not based on OS signals and thus there is no reason to stop using the dedicated GC thread when not using signals. Using a separate thread improved real-time behavior.

[Oct 11 2023]

  • MODIFIED: Make the Prolog flag float_overflow to affect read_term/3. With this flag setting, too large floats are read as infinity rather than raising a syntax error.

[Oct 9 2023]

  • MODIFIED: Issue a warning on suspect autoloading The autoloader now issues a warning if it loads a library that contains global goal or term expansion rules. Expansion typically improves performance or otherwise enhances the functionality of some of the predicates defined in the module.

[Oct 8 2023]

  • FIXED: Preserve table properties on reconsult. Reported by Jan Burse.

[Oct 5 2023]

  • CLEANUP: Removed unfinished and not maintained packages/cpproxy

[Oct 4 2023]

  • FIXED: PL_thread_attach_engine()/PL_thread_destroy_engine() on main thread The main thread did not set the open_count to 1, causing hthe attach/destroy cycle in the main thread to kill the main thread.

[Oct 2 2023]

[Oct 1 2023]

  • DOC: clarify some details of stream error handling

[Sep 29 2023]

  • TEST: Enable rational number tests when using LibBF.
  • TEST: Test suite for bomb DoS vulnerabilities.
  • SECURITY: Allow interrupts in the compiler This avoids using the "bomb" DoS attack using assertz/1 and friends.

[Sep 28 2023]

  • SECURITY: Allow interrupts in term_variables/2 and numbervars/4 variants Some of these variant goals require processing the tree such that shared terms are walked normally. Such goals can take exponential time. This patch allows processing interrupts.

    Without this, notably services such as SWISH that allow users to run arbitrary Prolog goals become subject to DoS attacks.

  • ENHANCED: Speedup arithmetic comparision in non-O mode.

[Sep 25 2023]

  • PORT: Partial work to allow MSVC build under Conda. This patch works around issues for CMake FindThreads.cmake. It also explicitly enables MSVC `/MD` to compile the packages if threading is enabled.
  • BUILD: Runtime configuration during boot for Windows As, on Windows, we install all DLLs in the same directory we do not need to add the package bin dirs to the foreign search path. But, we must use prolog_to_os_filename/2 to ensure proper handling of the search based on the executable.

[Sep 18 2023]

  • FIXED: #1197 function cmpr failing for negative values.

[Sep 17 2023]

  • FIXED: #1097 ctrl-C in read causes exit from REPL Fix consists of two parts. (1) if something (libedit) already set the stream error condition, make S__fillbuf() return with an error immediately and (2) do not abort the main query loop if we get an abort request.

[Sep 16 2023]

[Sep 12 2023]

  • ENHANCED: Allow interrupts during evalExpression()
  • PORT: Make new stuff work again using MSVC

[Sep 11 2023]

  • ENHANCED: dark theme arithmetic used blue on black. [no ci]

[Sep 10 2023]

  • PERFORMANCE: Add shortcut to PL_unify_number() Add a shortcut for the typical case where the number is a small integer, the target is a variable and we are not short on stack space.
  • PERFORMANCE: Simplify clearNumber() Notably improves performance for float arithmetic.

[Sep 8 2023]

  • FIXED: Memory leak in PL_put_term_from_chars() fast route. This function implements a fast route for integers and rationals and leaked the GMP/LibBF object for rationals and large integers.
  • ENHANCED: PL_get_float() to raise a float overflow on too large rational.

[Sep 7 2023]

  • BUILD: Added scripts/configure This script is used for a long time to maintain multiple versions under the same source tree. See script for details. [no ci]
  • PORT: Work around broken MacOS versions lacking <term.h> Reported by Matthias Gondan after failing build for CRAN
  • FIXED: PL_get_nchars() and friends CVT_INTEGER handling Broken in 2ac1553770ac1a9d6753b8b6e72ac2028815a028
  • ADDED: PL_get_nchars(): CVT_XINTEGER Allow converting numbers to hexadecimal strings.

[Sep 6 2023]

[Sep 5 2023]

  • DOC: open/4 reposition option.
  • MODIFIED: Disable toplevel variables if the flag toplevel_var_size is 0

[Sep 4 2023]

  • ENHANCED: Performance of nth1/3 and nth0/3 for mode (-,+,?)

[Sep 1 2023]

  • PORT: Remove emacs module declarations from SWI-Prolog.h The symbols must be exported, but we should not declare them as part of the API as that prevents building the sweep module. In MSVC the linkage options for exported and imported data is different.
  • FIXED: Recompilation logic may use an erased clause If the newly compiled clause is equal to the "current" clause, the new clause is destroyed and the old is kept. We must however check that the "old" is not yet erased.
  • FIXED: Message translation for trace(Head, Ports) Got getting location of predicate wrong and ansi_hyperlink/3 printed the URL rather than the label if the terminal does not support hyperlinks.

[Aug 30 2023]

  • ENHANCED: Avoid dependency of library(ansi_term) on package clib
  • ENHANCED: ansi_get_color/2 to use stream timeouts Old version used call_with_time_limit/2, but this is in a library, pulls in a shared object dependency and requires threads.
  • BUILD: Allow building the manuals in non-Unix environments.

[Aug 29 2023]

  • PORT: Find local home mor flexible. Normally swipl is in src, but using some backends there can be a configuration directory in between.
  • PORT: Property configure threads for packages.

[Aug 28 2023]

  • FIXED: bf_set_ui(): uint32_t >> 32 is undefined.
  • CLEANUP: signed/unsigned and other warnings for bf_gmp.c
  • CLEANUP: Resolve signed/unsigned comparison and negation of unsigned ints.

[Aug 27 2023]

  • PORT: Make multi-threading work with MSVC version - Allow using vcpkg package pthreads for threading. - Port atomic operations to use teh MSVC _Interlocked* intrinsics - Sync thread config for swipl-win.exe with libswipl.dll.

[Aug 26 2023]

  • PORT: Make LibBF compile using MSVC Now compiles with many warnings. Basics seem to work.

[Aug 28 2023]

  • PORT: Empty struct support for pl-wam.c
  • FIXED: set_prolog_gc_thread/1: no-op in the single-threaded version.

[Aug 20 2023]

  • PORT: Introduce free() for LibBF memory management. LibBF uses realloc(ptr,0) rather than free, but this is not-portable and flagged by the latests versions of valgrind.

[Aug 22 2023]

  • BUILD: Work around problem generating Unix Makefiles

[Aug 21 2023]

  • CLEANUP: `Remove swipl.home and swipl.rc from the source root dir.

[Aug 16 2023]

  • PORT: Fix various warnings generated by MSVC2022
  • BUILD: Simplify build_home.pl
  • BUILD: More patches to allow building as a CMake subdir. These patches notably deal with the package locations and documentation.

[Aug 15 2023]

  • BUILD: Allow building as a sub project from a larger CMake project This patch replaces use of CMAKE_SOURCE_DIR with CMAKE_CURRENT_SOURCE_DIR, so we can do
    add_subdirectory(swipl)

    in a larger project.

  • BUILD: Allow building as a sub project from a larger CMake project This patch replaces use of CMAKE_SOURCE_DIR with CMAKE_CURRENT_SOURCE_DIR, so we can do
    add_subdirectory(swipl)

    in a larger project.

  • FIXED: Typo in check_installation/0 (syntax error)
  • PORT: WASM: Do not try to get ioctl support.

[Aug 11 2023]

  • PORT: Further refine terminal support detection. Recent regression cause tty_size/2 to be undefined on systems where it can be supported.
  • ENHANCED: Compile all plugins using -fvisibility=hidden
  • ENHANCED: Use visibility attribute for install_t This allows compiling plugins with gcc -fvisibility=hidden, reducing the risc for symbol conflicts and reducing load time.

[Aug 9 2023]

[Aug 7 2023]

  • DOC: Clarify some details of blob and I/O functions
  • PPA: Dropped kinetic, added lunar

[Aug 3 2023]

[Aug 2 2023]

  • PORT: When using Macports for dependencies, set the cmake FrameWork search path
  • PORT: Disable swipy (janus) if CMake is older than 3.18.

[Aug 1 2023]

  • TEST: Avoid crash in unicode save/load test when pldoc is loaded. This is a work-around for an issue in PlDoc interacting with qcompile/1.

[Jul 28 2023]

  • ADDED: Return value PL_S_NOT_INNER when acting on non-inner query This return code may be generated by PL_next_solution(), PL_cut_query() and PL_close_query(). This is a first step making the query interface more robust against misuse.
  • ENHANCED: use_foreign_library/2 to support options This patch provides standard option support for open_shared_object/3 and passes options from use_foreign_library/2 to this predicate. This allows for e.g.
    ?- use_foreign_library(foreign(mylib), [visibility(global)]).

[Jul 26 2023]

[Jul 25 2023]

  • ADDED: PL_free_blob() This may be used to remove the data from a PL_BLOB_NOCOPY typed blob, calling the release() function immediately.
  • MODIFIED: PL_call() now passes exceptions This function used to trap the debugger and discard the exception.

[Jul 23 2023]

  • MODIFIED: PL_get_chars() and friends: use numbervars When using CVT_WRITE* option, the variables are numbered first if possible. That results in more compact, readable and reproducible output.
  • ADDED: Support functions for PL_put_dict() The functions _PL_cons_small_int() and _PL_unregister_keys() allow for (small) integer keys to dicts from C.

[Jul 21 2023]

  • ADDED: PL_for_dict() API This API enumerates the key/value pairs of a dict using a callback. It has been in use internally since dicts were added to the system.

[Jul 18 2023]

  • FIXED: Locale handling for error messages based on strerror() These strings are in the current locale and must thus be converted to Unicode for generating the Prolog exeption.

[Jul 17 2023]

  • FIXED: #1184 Load/save (qlf and saved states) for LibBF based bignums This patch provides QLF support for big integers and rational numbers when compiled with LibBF. The file format for the LibBF and GMP based versions is the same and therefore saved states and .qlf files that contain such numbers are portable between the two versions.

[Jul 15 2023]

  • MODIFIED: Allow Prolog data manipulation from tracer callback

[Jul 12 2023]

  • FIXED: #1185 read_term/3: comments are truncated on first 0-byte

[Jul 7 2023]

  • PORT: LibBF: Support quick load format for big integers ans rationals. Big integers and rationals are now saved if LibBF support is used for unbounded integers and rationals. The saved format is identical to the format used by the GMP version.

[Jul 5 2023]

  • PORT: Drop tty_goto/2 and related predicates if the term.h is not provided Reported to happen on MacOS using clang-15. The status of tgetent() that supports these predicates is rather unclear. Docs say they might be discontinued, so more extensive checking that they are really available seems justified.

    This patch keeps tty_size/2 if possible (depends on ioctl()).

[Jul 3 2023]

[Jun 5 2023]

  • ADDED: indicate DCG rules in xref_defined/3 This makes xref_defined(Src, Head, How) succeed (also) with How = dcg for DCG grammar rules.

[Jun 3 2023]

  • MAINTAIN: Add CI based on Github workflows

[May 31 2023]

[May 30 2023]

  • FIXED: Avoid closing a stream with an alias If a stream-handle is created for a stream with an alias (e.g., by stream_property/2), the stream would be closed if this handle is garbage collected.
  • ENHANCED: library(macros) to leave `#Var` alone.

[May 25 2023]

[May 24 2023]

[May 22 2023]

  • MODIFIED: Removed undocumented rename_predicate/2 hook. This hook was used to be able to wrap predicates. That is currently achieved more reliable and dynamically using wrap_predicate/4.
  • FIXED: Ensure expand_term/2 cannot alter the current source location.
  • FIXED: #1174: read_pending_codes/3: release stream on EOF or error.

[May 20 2023]

  • DOC: details about building packages

[May 17 2023]

  • ADDED: trap/1: aliases for det and =>. Expandable.

[May 16 2023]

  • MODIFIED: top_sort/2, deleted top_sort/3 added ugraph_layers/2 top_sort/3 was deleted due to mismatch of documentation and implementation for the order of the difference list arguments. The docs give a replacement.

    top_sort/2 now returns vertices from the same layer in input order, i.e., in standard order of terms.

    ugraph_layers(+UGraph, -Layers) returns the topogical sorted result as a list of layers. I.e., all legal toplogical sorts can be established by creating permutations for the layers.

[May 15 2023]

  • FIXED: catch/3 debugger interaction. In debug mode it was possible for catch/3 to not finish the catch if the goal succeeded deterministically due to CHP_DEBUG choice points.
  • CLEANUP: Remove very old work-around for clang bug.

[May 3 2023]

  • WASM: Get the link options for the various targets ok. This notably passes `-s STACK_SIZE=1048576` as the default 64K is too small for SWI-Prolog. The patch reorganises assembling the link option lists for better sharing of common options.
  • BUILD: By default implement VM instructions using functions for clang On recent versions of clang (14,15), the code produced using VM instructions as functions rather than a big switch is faster.

[May 2 2023]

  • BUILD: Generalize configuration of C-stack limit
  • BUILD: Added ccache support Currently disabled for Emscripted as that seems to do its own caching these days.
  • WASM: Removed export Pointer_stringify. Compiler complains and it is (no longer) used.

[May 1 2023]

  • FIXED: absolute_file_name/3: allow for duplicate options. This change also affects other predicates that use the Prolog built-in option handling.

[Apr 26 2023]

[Apr 25 2023]

  • ADDED: print_term/2: option auto_indent_arguments(Int) With this option (defaults to 4), dicts and compounds that are too wide ands whose funtor is at least twice this width, have their arguments printed on the next line.

[Apr 21 2023]

  • PORT: When using -DSTATIC_EXTENSIONS=ON, drop usage of dlopen() This is required for recent versions of Emscripten that give a runtime error on the usage of dladdr().

[Apr 20 2023]

  • TEST: Added test for #1168
  • FIXED: Issue#1168: race condition betweem abolish and CGC Clause Garbage Collection concurrent with abolish/1 could leave the predicate with erased clauses while it was not marked dirty. As a result, a subsequent attempt to assert/1 to this predicate results in an error trying to amodify a static predicate. Reported by Paulo Moura.
  • TEST: Create a new test directory to improve concurrency while testing.

[Apr 19 2023]

  • ADDED: Issue#1019: PL_put_wchars().
  • TEST: Fix and disable some tests when running under Wine.

[Apr 18 2023]

  • PORT: Demand C11 early

[Apr 14 2023]

  • DOC: Document issues with standard order on rational trees.
  • DOC: Issue#1164: clarify answer_write_options flag.

[Apr 12 2023]

  • DOC: Prolog flag toplevel_residue_vars.
  • FIXED: Addresses #1160, residual constraints in tuples_in/2 from clp(fd). Patch by @triska for Scryer Prolog.

[Mar 26 2023]

  • FIXED: Windows exists_file/1 and exists_directory/1 domain error. Avoid Domain error: `foreign_return_value' expected, found `-1'. Document that invalid names cause silent failure.

[Mar 24 2023]

  • MODIFIED: statistics/2 cputime and infereneces to include completed "child threads". This patch causes threads to keep track of their "creator" thread. If the creator still exists when a thread dies, the time and inferences are recorded with the creator and reflected in the statistics keys. The new keys self_cputime and self_inferences provide the original.
  • BUILD: When using -DSTATIC_EXTENSIONS=ON, do not install the libraries. This implies plugins are not installed as *.a files and libswipl.a is not installed. Only bin/swipl and the Prolog libraries and support files are installed.
  • FIXED: swipl.cmake syntax error

[Mar 23 2023]

  • BUILD: Only setup CMake rpath stuff if the Prolog core is a shared library. This allows building a completely static executable without RPATH/RUNPATH.
  • ENHANCED: Better error if process argv cannot be processed in current locale.

[Mar 22 2023]

  • FIXED: Using PL_new_atom() before PL_initialise() Lazy initialization of the atom infrastructure must initialize threads.
  • ADDED: PL_new_blob()

[Mar 16 2023]

  • PORT: Msys2 & Win, static build dependencies

[Mar 13 2023]

  • FIXED: recorded/2,3: If the first record was marked erased it is still reported.

[Mar 10 2023]

  • PORT: Do not link to dladdr() if not available.
  • BUILD: Allow for CMake to provide list of packages explictly as e.g. -DSWIPL_PACKAGE_LIST="clib;plunit"
  • MODIFIED: PL_qlf_* functions to use the normal public API function naming and calling conventions.
  • ADDED: PL_qlf_put_atom() and PL_qlf_get_atom(). Both functions may only be used from callbacks to blobs save/load hooks.
  • MODIFIED: names for integer exchange functions to qlf files.
  • MODIFIED: Stop exporting PL_qlf_getInt32() and its put version. They are not needed and easily implemented.
  • MODIFIED: Stop exporting PL_qlf_getString() and PL_qlf_putString(). These functions are too simple to write using e.g. Sfwrite() and Sfread() while the interface regarding lifetime if PL_qlf_getString() is not suitable for public use.
  • FIXED: Qlf save/load of Unicode text on Windows. Also makes the Qlf format portable between POSIX and Windows for wide strings using Unicode plane 1.

[Mar 9 2023]

  • TEST: Test load/save .qlf files. Current test deals with Unicode.
  • ADDED: profile/2: options sample_rate(+Rate) and ports(+Ports).

[Mar 7 2023]

  • FIXED: Prevent callbacks to Prolog from a thread running the atom garbage collector. Such callbacks may be initiated from blob release handlers.
  • FIXED: Windows: handle UNC paths properly.

[Mar 5 2023]

  • MODIFIED: engine_next_reified/2 to return an exception as throw(Exception) rather than exception(Exception). Compatibile with e.g. call_time/3.
  • FIXED: When using single threaded engines we must scan all engines during atom and clause GC
  • ADDED: Allow building using -DMULTI_THREADED=OFF -DENGINES=ON This provides engines without threads. This is merely a proof of concept. It proofs that the code changes are quite minimal. A full version requires more work:
    • Probably we should also remove message queues and thread signals.
    • Do we want thread-local predicates in engines? Actually that is also a question for the multi threaded version. Probably we need an option to engine_create/4.

    This spreads a lot more #ifdef in the code. Luckily mostly limited to pl-thread.h and pl-thread.c. Requires further cleanup by moving more functions and declarations under the same conditonals together and possibly split some stuff to a new file, e.g. move mutexes and possibly later message queues and signals to their own file.

[Mar 4 2023]

  • CLEANUP: There is no need for using the lingering structures to delay unallocation for some usage in single threaded mode. Split into linger_always() and linger().

[Mar 5 2023]

  • FIXED: Possible error getting stack trace.

[Mar 4 2023]

  • TEST: Disable pipe test when running under Wine.
  • TEST: Prevent test from failing of concurrent threads are active.
  • ENHANCED: sleep/1: sleep(0) just does sched_yield() if possible.
  • CLEANUP: Use new style foreign language interface for predicates from pl-sys.c.

[Mar 3 2023]

  • ENHANCED: If we fail to print an exception message through print_message/2, print the raw exception.
  • FIXED: Make last resort stack resize work and (also) apply it if an exception is being processed.

[Mar 1 2023]

[Feb 28 2023]

  • ADDED: argv_options/3: allow for optional long options by allowing for a boolean in the disjunctive type.

[Feb 27 2023]

  • DOC: Clarify exceptions behavior
  • DOC: add a few background papers
  • FIXED: det/1 and friends to propagate the expectation in last calls to a meta predicate.
  • FIXED: XSB emulation no longer needs subseq/3 as that is now in our library(lists) as well.
  • TEST: Fixed tests to comply with e23c141be2f071b450f0d39981ac53251e1bd4f1 in debug mode.

[Feb 24 2023]

  • MODIFIED: Writing \ quoted without character_escapes should not double the \. This bug was introduced with cbe691f8af61ccaf466147868a316b96c110fedb to "fix" term_to_atom('a\\b', A) to produce A = 'a\\b' (which is quoted again by the toplevel to produce A = '\'a\\\\b\''. The issue is that term_to_atom/2 using PL_write_term() with PL_WRT_QUOTED, but not PL_WRT_CHARESCAPES. There is now a new flag PL_WRT_NO_CHARESCAPES. If either flag is given, we explicitly enable or disable character escapes. If none is given, the behaviour depends on the global (module user) value of the character_escapes flag.

    This implies that e.g. term_to_atom('a\nb', A) used to produce a quoted atom with a plain newline, while in the new version the newline is escaped as \n.

    Many foreign libraries using PL_write_term() or PL_get_chars() using CVT_WRITE did not use character escapes while they do now. As long as the output is read by Prolog the result is the same.

[Feb 26 2023]

  • FIXED: with_output_to/3: need to restore the streams while redirected to avoid leaking the stream handle because it remains referenced.
  • FIXED: tty_get_capability/3: memory leak.
  • FIXED: Memory leak in peek_string/3.
  • MODIFIED: Renamed exception processing hook prolog_exception_hook/4 into prolog_exception_hook/5, providing an additional argument that contains the current setting of the debug flag. Note that we cannot ask for this flag as the hook runs in "nodebug" mode. As the change is incompatible anyway, we also move the hook to the prolog module where the modern system hooks live. The new argument is used by library(prolog_stack) to make catch/3 behave as catch_with_backtrace/3 when in debug mode if the "guard" debug is defined (default). If this is not desired, use
    :- use_module(library(prolog_stack)).
    :- retractall(prolog_stack:guard(debug)).

    Code that use the old hook must rename the predicate and add the Debug argument. Code that wishes to be compatible with old and new Prolog can implement both hooks.

[Feb 23 2023]

  • FIXED: error propagation of call_time/2 and updated docs.
  • MODIFIED: call_time/3 to not rethrow the exception but return it in the status reification as throw(Error).

[Feb 22 2023]

  • ADDED: base64_encoded/3: added charset(openbsd), implementing the OpenBSD alphabet for base64 encoding Needed for bcrypt implementation in packages/ssl
  • FIXED: Provide (dummy) profiling interface for foreign code if profiling is not supported.

[Feb 21 2023]

  • ENHANCED: explain/1 to report predicates as non-terminal if this is known.

[Feb 20 2023]

  • ENHANCED: Use 64 bit counters for profiling.

[Feb 19 2023]

  • FIXED: Issue#122: unification can create unsatisfyable or nodes.

[Feb 18 2023]

  • ADDED: library(lists): subseq/3.
  • WASM: make prolog compatible with emsdk 3.1.31
  • FIXED: profiler port counts for redo and fail. Rather than trying to count redo, we now count fail and compute redo from call+redo = exit+fail. Note that a call can be matched with at most one fail.

[Feb 13 2023]

[Feb 12 2023]

  • DOC: Better explanation for list iteration by Peter Ludemann.

[Feb 10 2023]

  • PORT: Silence tcmalloc except for Linux. Not ported to Windows and conflicts with libc on MacOS.

[Feb 9 2023]

  • ADDED: halt/1 to accept signal names as status code. This causes an exit with status 128+signum.
  • FIXED: make halt(abort) really ignore halt cancellation.

[Feb 8 2023]

  • DOC: Clarify some details of PL_put_list(), PL_cons_list(), PL_unify_list() and modify some sample code

[Feb 6 2023]

  • DOC: Issue#1116: typo in example.

[Feb 1 2023]

  • FIXED: LibBF: bug in mpz_rootrem() optimization Tripped over case when rop same as OP in degenerate case. Also replace mpz_sub_ui with mpz_add_si since argument op_sign is signed.

[Jan 30 2023]

  • FIXED: If locking mutexes can be interrupted, handle signals and exceptions properly.

[Jan 27 2023]

  • PORT: fix cat2 test for windows
  • DOC: Point at the Prolog flag tmp_dir from the predicates that create temporary files.
  • DOC: Document all environment variables that control running the test suite.

[Feb 14 2023]

[Feb 13 2023]

[Feb 12 2023]

  • DOC: Fix typos + fix example code. Make PL_get_nil_ex() explicitly propagate an old exception. Effectively that would have happened anyway.
  • MODIFIED: Move profile interface from library(statistics) to library(prolog_profile), With that we can easily omit installing this library and C API if the system does not support profiling. This is a first rough split, making as few as possible changes.
  • MODIFIED: Deal with return value of the blob save function, propagating a possible exception. Documented the save and load functions. Joined work by Peter Ludemann and Jan Wielemaker.
  • DOC: Better explanation for list iteration by Peter Ludemann.
  • TEST: More sub_atom/5 and sub_string/5 tests.
  • DOC: sub_atom/5, sub_string/5 by Peter Ludemann.

[Feb 10 2023]

  • PORT: Silence tcmalloc except for Linux. Not ported to Windows and conflicts with libc on MacOS.
  • CLEANUP: Remove old Pentium counters based statistics. Especially since we can compile virtual machine instructions to functions we have better mechanisms to achieve the same.

[Feb 9 2023]

  • ADDED: halt/1 to accept signal names as status code. This causes an exit with status 128+signum.
  • FIXED: make halt(abort) really ignore halt cancellation.

[Feb 8 2023]

  • DOC: Clarify some details of PL_put_list(), PL_cons_list(), PL_unify_list() and modify some sample code
  • MAINTAINANCE: Added printf format checking to PL_message() and PL_fatal_error()

[Feb 6 2023]

  • DOC: Issue#1116: typo in example.

[Feb 4 2023]

  • BUILD: Allow building with -DUSE_GMP=OFF -DUSE_LIBBF=OFF

[Feb 1 2023]

  • FIXED: LibBF: bug in mpz_rootrem() optimization Tripped over case when rop same as OP in degenerate case. Also replace mpz_sub_ui with mpz_add_si since argument op_sign is signed.

[Jan 31 2023]

  • DOC: tweak WASM port introductory text

[Jan 30 2023]

  • WASM: Added swipl-bundle-no-data.js, providing SWI-Prolog as bundle (with wasm bundled in js), but no data file, so you must provide the application as saved state.
  • MODIFIED: standard order of terms to use cmpr/2 for comparison, comparing mixed float/rational exact (i.e., as rationals).
  • MODIFIED: min/2 and max/2 functions propagate NaN rather than the concrete value.

[Jan 25 2023]

  • ADDED: functions cmpr/2, minr/2 and maxr/2 that compare mixed float/rationals exact (i.e., after converting the float to rational). The min/max versions propagate the rational in case of a tie and propagate numbers rather than NaN.

[Jan 30 2023]

  • FIXED: If locking mutexes can be interrupted, handle signals and exceptions properly.

[Jan 27 2023]

  • PORT: fix cat2 test for windows
  • DOC: Point at the Prolog flag tmp_dir from the predicates that create temporary files.
  • DOC: Document all environment variables that control running the test suite.
  • TEST: Run unsafe thread_wait tests only if SWIPL_TEST_FAIL_ON_UNLIKELY is set to y.
  • FIXED: `1Inf` should be invalid syntax.

[Jan 26 2023]

  • DOC: Foreign language details. Notable PL_raise_exception().

[Jan 23 2023]

  • FIXED: With float_undefined set to nan, 0/0 must return NaN.

[Jan 8 2023]

  • ADDED: WASM: Create swipl-bundle.js that contains swipl-web.js, swipl-web.wasm and swipl-web.data.

[Jan 4 2023]

[Jan 19 2023]

[Jan 20 2023]

  • FIXED: with_output_to/3 to flush the streams before finishing the capture.
  • ADDED: Sdprintf() and friends to accept the t integer size specified for ptrdiff_t.

[Jan 17 2023]

  • MAINTENANCE: Added checking format templates for Sdprintf() and friends when compiled with -DCHECK_FORMAT. Introduces SdprintfX() and similar functions that are not checked because they use one of the extensions such as %Us or %Ws (UTF-8/wchar_t string).

[Jan 19 2023]

[Jan 17 2023]

  • FIXED: Windows: string_length/2 did not handle UTF16 surrogate pairs correctly.
  • DOC: Document PL_write_term()

[Jan 16 2023]

  • FIXED: Possible deadlock in a transaction commit due to different ordering in locking L_GENERATION and L_PREDICATE locks.

[Jan 15 2023]

  • PORT: unix-like directories under MSYS2

[Jan 14 2023]

  • DOC: fix minor typo

[Jan 13 2023]

  • FIXED: Issue#195: cmpFloatNumbers() for NaN.

[Jan 12 2023]

  • FIXED: Implement A_MPZ and A_MPQ instructions when using LibBF binding. This fixes using such numbers in expressions compiled with optimization enabled. Reported by Rick Workman.

[Jan 11 2023]

  • FIXED: Issue#1091: optimised compilation of clauses containing big integers or rational numbers in expressions.
  • FIXED: Issue#1092: term_hash/2,4 crashes on Unicode strings.
  • DOC: Use PlDoc for trace/1,2 documentation.
  • ADDED: trace/1,2: print wall time since call port for other ports.
  • ADDED: list_debug_topics/1 to search, only print active topics, etc. This predicate now uses print_message/2. debugging/0 is hooked to show the active topics.
  • ADDED: debugging/0: allow extensions using debugging_hook/0
  • DOC: Fixed PL_Q_CATCH_EXCEPTION interaction with the debugger.
  • DOC: Reviewed and updated foreign language sections on exception handling. Thanks to Peter Ludemann for pointing the many parts of the docs that were unclear or outdated.

[Jan 10 2023]

  • DOC: Added some details for PL_exception()

[Jan 5 2023]

  • FIXED: Issue#1087: crash on inlined unification against a rational number.

[Dec 28 2022]

[Dec 19 2022]

  • PORT: msys2, add %MINGW_PREFIX%/bin to dll path
  • PORT: msys2, do not copy system dlls into home
  • ADDED: Prolog flag msys2 to detect the MSYS2 installation.

Package bench

[Nov 28 2023]

  • ENHANCED: Better compensation for computing dummy overhead. Contributed by Jose Morales
  • PORT: Make benchmarks run on Scryer Prolog 0.9.3

[Nov 26 2023]

  • FIXED: queens_clpfd.pl benchmark merely posted the constraints. Now actually solves them and does not generate all solutions as these are too many.

[Nov 24 2023]

  • ADDED: Ciao lang
  • PORT: Improve portability for boyer.pl

[Nov 22 2023]

  • PORT: Generalize, support XSB, GNU-Prolog and Trealla Prolog.

[Nov 23 2023]

[Nov 22 2023]

[Nov 21 2023]

  • ENHANCED: Portability, Prolog driver, many details Now uses a single (SWI-)Prolog program for the overall management, running the Prolog system(s), joining the data and generating the chart.

    We now have a system in place to support pretty much every Prolog system, with or without modules. SWI, Yap and SICStus can do the job with the original sources. For e.g., Scryer we transform the sources and test beforehand which files Scryer can handle.

[Nov 22 2023]

[Nov 19 2023]

  • PORT: Support CSV for all platforms
  • PORT: Revive YAP and SICStus compatibility.

Package debian

[Aug 7 2023]

  • ADDED: dependency on Python itself. Although a dependency on libpython3-dev is good enough, cmake cannot find the Python conponents without Python.

[Aug 2 2023]

  • ADDED: Python3-dev dependency

Package archive

[Jul 31 2023]

  • TEST: Avoid dependency on swipl.rc This file is only installed with xpce.

[Apr 19 2023]

  • TEST: Disable write tests under Wine. These tests work fine under Windows.

Package bdb

[Dec 21 2023]

  • DOC: Build documentation

Package chr

[Dec 5 2023]

[Nov 14 2023]

  • BUILD: Another missing use_module for maplist/3.
  • BUILD: Avoid relying on autoloding during bootstrapping.

Package clib

[Jan 25 2024]

[Jan 12 2024]

[Dec 12 2023]

  • BUILD: replace CMake deprecated exec_program() with execute_process()

[Dec 10 2023]

[Nov 21 2023]

[Nov 9 2023]

  • ENHANCED: Make rewrite_host/3 hook work fot tcp_connect/3 Also allows tcp_connect/3 to accept an IP number. These two enhancements avoid the need to lookup localhost on Windows.
  • ADDED: socket:rewrite_host/3 hook for tcp_connect/2 This multifile hook allows for mapping hostnames, either directly to an IP address or another host. Currently a work-around for Windows broken handling of localhost, mapping it directly to the IP address 127.0.0.1.

[Nov 6 2023]

  • PORT: CRT handles for the process pipes must be owned by libswipl.dll.
  • PORT: Work around inconsistent definitions for ETIMEDOUT on Windows.
  • PORT: We cannot share Windows CRT stream handles with the Prolog core.

[Nov 4 2023]

  • PORT: Windows: create_process/3: make stream(S) work. This patch fixes the options stdin(stream(S)), etc. when S denotes a file stream by enabling inheritance for the handle before calling ProcessCreate().

[Nov 3 2023]

[Aug 30 2023]

  • TEST: Use PlUnit for the socket tests.
  • FIXED: udp_receive/4: did not pass address parameters correctly.

[Aug 29 2023]

  • PORT: MSVC Avoid issues with different address length and buffer size types.
  • PORT: Support MSVC. Mostly silense warnings, improved types, fixed headers.

[Aug 11 2023]

  • FIXED: Export install function from hashstream.so

[Aug 6 2023]

  • PORT: Proper ip6 support detection for FreeBSD

[May 23 2023]

  • FIXED: uuid/1,2: Prolog implementation for random UUID This implementation is only used if the C based ossp-uuid implementation cannot be found.

    Set the two most significant bits (bits 6 and 7) of the clock_seq_hi_and_reserved to zero and one, respectively according to https://datatracker.ietf.org/doc/html/rfc4122#section-4.4

[Apr 3 2023]

[Feb 28 2023]

  • ADDED: uri_edit/3 to build or modify a URI from components.

[Feb 26 2023]

  • FIXED: Memory leak in uri handling

[Feb 13 2023]

  • FIXED: socket address length to be the actual used length. Linux does not care, but MacOS does.

[Feb 7 2023]

  • MODIFIED: uri_authority_components/3: deal with IPv6 addresses embraced using [].
  • PORT: Deal with IPv6 address struct for MacOS
  • FIXED: ip_name/2 for `::1`.
  • ENHANCED: tcp_connect/3 to stick with using the address information if no socket domain is specified, rethrowing the first exception if the connection fails.

[Feb 6 2023]

  • MODIFIED: tcp_connect/3 now tries addresses returned by host_address/2 in order. This typically prefers IPv6 addresses over IPv4 and connects properly if the server can only be accessed on one of these domains.
  • ADDED: ip_name/2 to translate between string and ip address structure.
  • ADDED: host_address/3.

[Feb 5 2023]

  • CLEANUP: Update socket data structures to support IP6
  • ADDED: socket_create/3. Will replace all other socket creation predicates.

[Feb 1 2023]

[Jan 29 2023]

  • TEST: Fixed encoding of test file.

[Jan 26 2023]

  • FIXED: uri_iri/2 to not decode encoding &=; in the query string.

[Jan 17 2023]

  • PORT: Fix some Sdprintf formats

Package cpp

[Dec 17 2023]

  • DOC: Improve blob sample code

[Nov 2 2023]

  • MODIFIED: SWI-cpp2.h includes inlined methods by default
  • PORT: Removed check_rc(). Seems not all C++ compilers can deal with this.

[Oct 21 2023]

  • ENHANCED: added unwrap() method and PlUnwrapPtr()

[Oct 19 2023]

  • PORT: Retain C++17 compatibility by removing designated initializer (a C++20 feature)
  • TEST: Ensure strict checking of C++17 standard on GCC.

[Oct 4 2023]

  • ENHANCED: PlStream error handling + wrapper methods (and remove PlAcquireStream)

[Sep 17 2023]

  • ENHANCEMENT: added PlAcquireStream

[Sep 11 2023]

  • ENHANCED: AtomMap utility

[Sep 7 2023]

  • DOC: blobs and exceptions
  • ENHANCED: std::string instead of char* in some calls (no code change needed) - Can add char* interface if needed for performance (unlikely) PlTerm(term_t) constructor is public, for consistency with PlAtom

[Sep 1 2023]

  • PORT: MSVC MSVC work-arounds for compiling the tests. MSVS requires c++20 for the blob type initialization.

[Aug 18 2023]

  • FIXED: likes.cpp sample code

[Aug 7 2023]

  • CLEANUP: Simplify blob interface and more Simplify blob interface (PlBlob) - Add PlTerm::unify_blob for unique_ptr - Add try/catch to blob callbacks - Improve documentation of PlBlob Rename some implementation functions to more meaninful names Fix inverted condition test (zero vs non-zero return code) Move some code from SWI-cpp2.h to SWI-cpp2.cpp Add PREDICATE_CATCH macro to remove copy&paste code duplication Rename some example classes to improve the documentation Improve some garbage collection tests for blobs Update with changes from swipl v9.1.12

[Aug 2 2023]

[Jul 26 2023]

  • TEST: Failed on Windows Windows writes %p without leading 0x.

[Jul 25 2023]

  • PORT: Fixed Windows build Not clear to me why the Windows specific C++ wrapper claims the API functions cannot be found. Disabled for now.

[Jul 16 2023]

  • DOC: Fixed LaTeX errors

[Jun 11 2023]

  • ADDED: added API for blobs

[Apr 29 2023]

  • DOC: Fixed LaTeX errors and duplicate conclusion section.

[Apr 8 2023]

  • ENHANCED: C++-compatible exception handling + more wrapper functions and classes SWI-cpp2-plx.h contains wrapper functions (imported from SWI-cpp2.h) - throw PlException for Prolog errors - most SWI-Prolog.h functions have a wrapper. verify() methods removed from PlAtom, PlTerm, etc. - the wrapper functions do the checking. Some executable code has been moved to SWI-cpp2.cpp - can be inlined, if desired. PlException is now a subclass of std::exception, not a subclass of PlTerm. PlTypeError, PlDomainError, etc. are no longer subclasses of PlTerm, but are functions for creating suitable PlException objects. The string comparison operators are deprecated; use as_string() and std::string comparison instead, which allows specifying the encoding. Added PlRecord, PlRecordExternal, PlControl (used by PREDICATE_NONDET), PlStream. Fixed numerous bugs and misfeatures; added tests.

[Mar 24 2023]

  • TEST: Do not build and link the tests when building with STATIC_EXTENSIONS

[Mar 10 2023]

  • TEST: Updated for new qlf integer exchange functions.

[Mar 5 2023]

  • TEST: Add some PL_qlf_*() tests
  • TEST: Fix C++ allocation tests

[Feb 8 2023]

  • TEST: PL_open_query with various options plus some foreign.doc examples

Package http

[Jan 26 2024]

[Nov 26 2023]

[Nov 9 2023]

  • ENHANCED: http_stop_server/2: try to avoid connecting This sends a signal to the HTTP accept thread. To make sure the signal is processed it connects after the signal. Unfortunately this takes 2 seconds before raising an error on Windows. We now first check that the signal is processed within 0.1 second. If so, we are happy. If not, we try to connect anyway.

[Oct 11 2023]

  • ENHANCED: Pass number reading exceptions rather than generating invalid_number.

[Sep 6 2023]

  • FIXED: Several predicate options declarations.

[Aug 29 2023]

  • PORT: Support MSVC Cleanup types.

[Aug 1 2023]

  • ADDED: Updated list of HTML void elements

[Jul 28 2023]

[Jun 20 2023]

[Jun 1 2023]

  • ADDED: Full HTTP chunked support for CGI streams The CGI stream, as used by the HTTP server framework, supports setting the transfer encoding to chunked, but ctually had its own separate implementation. This commit shares most of the code with http_chunked.c and provides support for emitting chunk extensions as well as trailers.
  • ENHANCED: http_open/3: add lazy loading of chunked encoding support.

[May 31 2023]

[May 30 2023]

  • ADDED: UTF-8 as default encoding for several SPARQL related content types.

[May 19 2023]

  • FIXED: Prevent type error in redis based session management.

[May 2 2023]

  • FIXED: http_open/3 with keep-alive connections Fixes two issues: (1) streams may be left open (leaking stream handles) when an error occurs during the HTTP handhake and (2) errors during the http handshake were propagated without the error(_,_) wrapper. With http handshake we refer to sending and reading the header as well as, for https, the TLS handshake.

[Apr 25 2023]

  • MODIFIED: reply_json_dict/2 to explicitly use UTF-8 by default. Where the other reply_json variants used application/json; charset=UTF-8, reply_json_dict/2 used only application/json. This is fine according to the standards, but some clients insist on the charset. Ths patch makes all versions compatible.

[Apr 24 2023]

  • FIXED: library(http/http_log): exception when logging was disabled. Harmless as the exception was printed but otherwise ignored.

[Mar 7 2023]

  • FIXED: When stream garbage collection is enabled we cannot make a callback from the CGI context stream in case a context was lost and reclaimed through AGC.

[Mar 2 2023]

  • ADDED: #158: Handle surrogate pairs in http/json The JSON string "\ud83d\udc95" has one codepoint, not two.

    This is because the spec allows extended characters to be encoded as a pair of 16-bit values, called a "surrogate pair".

    From RFC 4627:

    To escape an extended character that is not in the Basic Multilingual Plane, the character is represented as a twelve-character sequence, encoding the UTF-16 surrogate pair. So, for example, a string containing only the G clef character (U+1D11E) may be represented as "\uD834\uDD1E".

    This commit fixes the JSON parser to handle such surrogate pairs.

[Feb 28 2023]

[Feb 25 2023]

  • FIXED: Possible non-determinism in write_html/2 on a mailbox that has not been posted to.

[Feb 10 2023]

  • FIXED: Issue#157: do not try to read the reply data for HTTP return codes that have no reply: 1xx and 204.
  • ADDED: http_open/3 using the headers(-Reply) option to add status_code(Code) to the headers.
  • FIXED: Issue#157: reading reply for OPTIONS method.

[Feb 9 2023]

  • MODIFIED: If the server is terminated on a signal, exit with 128+signum.

[Feb 7 2023]

  • DOC: IPv6 consequences for the HTTP libraries.
  • ADDED: http_server/2 to allow creating IPv6 sockets.

[Jan 27 2023]

  • FIXED: `1Inf -> 1.0Inf` syntax.

[Jan 23 2023]

  • ENHANCED: More robust restoring of current output after redirection to the CGI stream.

Package inclpr

[Sep 1 2023]

  • PORT: MSVC Cleanup old code.

Package jpl

[Dec 12 2023]

  • BUILD: replace CMake deprecated exec_program() with execute_process()

[Nov 5 2023]

  • PORT: Avoid conversion messages and warnings for MSVC

[Oct 16 2023]

  • COMPAT: Set Prolog flag gc_thread to false SWI-Prolog used to disable the garbage collection thread on `--no-signals`. This was for JPL and is removed in version 9.1.18. It is unclear why using a separate GC thread causes the prolog_in_java test to hang.

    This patch sets the GC thread explicitly.

[Sep 25 2023]

  • UPDATED: Java standards from 7 to 8. Support for 7 is dropped from latest OpenJDK releases and 7 is officially EOL for a while.

Package ltx2htm

[Dec 8 2023]

  • MODIFIED: As all extensions are now installed in a subdirectory we no longer need an extra layer.

[Sep 30 2023]

  • FIXED: Various math symbols Unicode translation

[Aug 29 2023]

  • PORT: Support MSVC Silense warnings, cleanup types.

[Aug 14 2023]

  • ENHANCED: Use more Unicode characters for math commands.

Package mqi

[Dec 8 2023]

  • MODIFIED: Install MQI as a SWI-Prolog app This simplifies the command line interface and avoids the need for autoloading. New interface is
    swipl mqi [option ...]

[Aug 17 2023]

  • TEST: Don't use Unix domain sockets if the path is so long that it will fail

[Aug 16 2023]

  • BUILD: Avoid dependency on CMAKE_SOURCE_DIR

[Mar 4 2023]

  • TEST: Do not run tests if Pythin cannot be found.

Package nlp

[Aug 29 2023]

  • PORT: Suppress MSVC warnings

Package odbc

[Oct 18 2023]

  • ADDED: odbc_table_column/4: improved mapping to Prolog types. Maps 'TEXT' to longvarchar(Length).
  • ADDED: odbc_prepare/4: return derived parameter mapping This commit also improves debug messages on type mappings to use type names rather than integers and writes debug messages for the type mapping for prepared statement arguments.

[Aug 31 2023]

  • PORT: MSVC Cleanup types (inroduce more size_t)

[Jan 29 2023]

  • PORT: Fix some printf formats

Package pcre

[Aug 30 2023]

  • PORT: MSVC Avoid type warnings.

[Jul 31 2023]

  • TEST: Install input files.

[Mar 12 2023]

  • ADDED: added save/load functionality to pcre blob

[Feb 7 2023]

  • ADDED: re_match/2,3: calls to known patterns may be compiled using set_prolog_flag(re_compile, true).

Package pengines

[Dec 10 2023]

  • CLEANUP: use uri_edit/3 to compute the final server path

[Nov 26 2023]

  • FIXED: chunk=false. Spotted by @meditans

[Nov 22 2023]

  • ADDED: Allow no-chunking behavior for pengines. If chunk=false we avoids the usage of findnsols (and the effects on global variables associated with its backtracking). Initially, this was motivated by the fact that I wanted the pengine top-level (which is recursive in nature) to respect the chr store, but I also think it's a more principled thing to do.

[Sep 6 2023]

  • FIXED: Predicte option declarations.

Package pldoc

[Dec 15 2023]

  • FIXED: Avoid dependency on library(pce) Allows running the documentation tools without library(pce)

[Dec 12 2023]

[Dec 10 2023]

  • CLEANUP: File system interaction to use more libraries.
  • DOC: Document doc_save/1 include_reexported(Bool) option.

[Nov 26 2023]

  • ADDED: `@since` tag Allows annotating the version when a predicate was added.

[Oct 18 2023]

  • ADDED: man_pages//2 option qualified(always) This is used by help/1 on the commandline to show documented private predicates when found in some module.

[Oct 17 2023]

  • FIXED: Handle search if summary contains non-ASCII characters.

[Jul 12 2023]

  • ENHACED: Give manual section in HTML title

[May 9 2023]

  • ADDED: Include documentation for exported predicates loaded from other files. While this was in place for imported modules (re-export), documentation from non-module files loaded by and exported from a module was not included.

[Feb 28 2023]

  • FIXED: LaTeX backend: generating \url{} must escape #.

Package plunit

[Jan 17 2024]

  • MODIFIED: removed library(test_cover). This library is moved to the core as library(prolog_coverage) because it has no dependencies on the unit testing and serves more purposes.

[Jan 16 2024]

  • ADDED: library(test_cover): allow to save and restore coverage data. This patch is a major improvement to the coverage analysis tool. It modifies the API, although the old show_coverage/2 is still working as it used to.

    It improves the report and, most importantly, allows for combining coverage data from multiple Prolog invocations.

  • ADDED: cov_save_data/1.
  • FIXED: #23 allow set_tests_options([run(make(all))]).

[Jan 12 2024]

[Dec 14 2023]

[Nov 14 2023]

  • FIXED: show_coverage/2: details for non-module files with tests. A non-module file that defines a test was not considere a non-module file due to the existence of the test module and as a result, coverage details were no shown for such files.

[Oct 13 2023]

  • ENHANCED: If --on-warning=status or --on-error=status is active, consider such messages testv failures When running tests using --on-error=status, printing an error message that does not cause a test to fail silently ignores the message while Prolog exits with status 1. That is hard to debug. Now, if these flags are present, tests that emit warnings or errors are considered failed and thus the test is printed.

[Jul 26 2023]

  • FIXED: call print_message/2 for begin/end unit also when tests run in paralel Runs print_message(silent, plunit(begin(Unit))) and print_message(silent, plunit(end(Unit, Summary))).

[May 1 2023]

  • ENHANCED: Name of failed test. Now prints both the unit and test and uses quoted write so you can copy/paste the result.

[Mar 5 2023]

[Feb 18 2023]

  • DOC: Sync recent changes into the LaTeX docs

[Feb 13 2023]

  • FIXED: forall(Generator) tests that failed on an assertion considered all subsequent generated tests to fail as well.
  • FIXED: run_tests/0-2: failing tests were no longer reflected in the success/failure of this predicate.

[Feb 12 2023]

  • MODIFIED: Removed global concurrent(true), keeping only jobs(Count). At unit level, the option is maintained, but currently prints a message that it is not supported.

[Feb 10 2023]

  • FIXED: make/0 to run all unit tests in changed files rather than only the first unit.

[Feb 2 2023]

  • FIXED: Avoid using tty width if really narrow.
  • FIXED: Bad format string. Peter Ludemann.

[Feb 1 2023]

  • ADDED: Re-implemented library(plunit) option processing, mapping all global test options to Prolog flags plunit_<option>, e.g. ?- set_prolog_flag(plunit_format, log).

    is the same as

    ?- set_tests_options([fomat(log)]).

    Added option show_blocked(+Boolean) to list names of blocked tests and their reason only on demand.

[Jan 31 2023]

  • FIXED: reporting blocked tests.

[Jan 30 2023]

  • ENHANCED: load_test_files/1: provide feedback on found/loaded tests.
  • FIXED: Restore output when interrupting a running test. @swi.

[Jan 26 2023]

  • FIXED: Avoid defining term_expansion/2 as discontiguous. It is not defined for swi, causing check/0 to report a warning.

[Jan 25 2023]

  • MODIFIED: Large scale rewrite the library(plunit). Highlights:
    • Added timeout support - Added concurrency at the unit level using the jobs(Jobs) option. - Added output(on_failure) (default) to only emit console output of a test when it failed. - Added two output formats:
      • tty, which is the default it the output is a tty reuses the current output line on success, only displaying failed tests.
      • log, which maintains all output. - Removed the sto(Mode)

      options, replaced by an occurs_check(+Mode) option at the global, unit and test level.

    A lot of internal restructuring.

[Jan 20 2023]

[Dec 8 2022]

  • ADDED: test_set_options/1: output(+Mode) to suppress output or emit it only after the test fails.

[Dec 7 2022]

  • CLEANUP: Cleaner code for running tests and map to results. This is a squashed commit for a large set of improvements. Roughly, in tackles:
    • Cleaner wrapping code for running the tests, removing a lot of code duplications
    • Make test time available to a larger part of the code and use call_time/2 to get more extensive resource usage information than just time.
    • MODIFIED: Various message formats have changed. This may impact code that uses the message hooks to make the output satisfy some test driver. This is also the driving force: the end-goal of these changes is to provide a good concurrent test framework.

Package protobufs

[Dec 12 2023]

  • BUILD: replace CMake deprecated exec_program() with execute_process()

[Aug 30 2023]

  • PORT: MSVC Cleanup float32 and int32 handling.

Package redis

[Jun 1 2023]

  • FIXED: Better reconnect implementation

Package semweb

[Nov 30 2023]

[Sep 6 2023]

  • FIXED: Predicate options declarations.

[Sep 1 2023]

  • PORT: MSVC Type cleanup, added atomic versions.

[Apr 29 2023]

[Mar 7 2023]

  • FIXED: rdf_literal/1 should not succeed on IRIs in object position

[Feb 26 2023]

  • FIXED: memory leak in Turtle parser in create/destroy cycle.

[Jan 29 2023]

  • PORT: Fix some *printf formats

[Jan 17 2023]

  • PORT: Fix some Sdprintf formats

Package sgml

[Jan 28 2024]

  • PORT: Define PATH_MAX by hand if all fails

[Aug 29 2023]

  • PORT: MSVC More portable types and avoid possible overflows by using size_t
  • PORT: Support MSVC Suppress warnings, support MSVC atomic intrinsics.

[Aug 11 2023]

  • FIXED: Race condition in dtd_property/2 Can lead to Domain error: dtd_property’ expected, found entities(_37838)'

[Apr 16 2023]

  • ADDED: the atom transformation to the attribute value in xpath. The content attributes provided with load_structure/3 can be atoms or strings depending on the attribute_value/1 option. So adding a transformation of attribute values to an atom in xpath/3 should be a useful feature, such as string transflation.

[Feb 26 2023]

  • TEST: Free sgml parser and end of test to avoid a memory leak.

Package ssl

[Nov 7 2023]

  • PORT: Add OPENSSL_Applink() to ssl4pl.dll This function is used by OpenSSL to get module-consistent of the MS CRT library. It is expected at the application level. This patch tries to keep it locally in the ssl binding with a small relay function from the SWI-Prolog executable.
  • PORT: Make use of OpenSSL "applink" Consistency use OpenSSL applink.c if this is defined. This patch itself does not enable applink.
  • TEST: Allow running SSL test suite from main build directory.

[Nov 6 2023]

  • PORT: Create test certificates when running under Conda

[Oct 13 2023]

  • FIXED: Avoid leaking file handle in test

[Sep 27 2023]

  • PORT: Handle the zlib OpenSSL dependency correctly on Windows.

[Aug 29 2023]

  • PORT: MSVC Make configure work by removing z.lib dependency when not using MinGW and avoid several type errors.
  • PORT: MSVC MSVC doesn't allow for array declaration from `const int`. Also use MSVC intrinsics for atomic operations.
  • FIXED: Return type for Prolog term.

[Feb 22 2023]

  • ADDED: crypto_password_hash/2,3 option algorithm(bcrypt) Uses the Openwall implementation of BCrypt, a public-domain, widely-used C implementation.

    Requires openbsd support from library(base64), added Feb 22 2023.

Package sweep

[Nov 16 2023]

  • ADDED: in-buffer completions for Prolog flags * sweep.pl (sweep_context_callable_arg/4): Report "flag" context. (sweep_flags_collection/2): New predicate. * sweeprolog.el (sweeprolog--flag-completion-at-point): New function. (sweeprolog--atom-or-functor-completion-at-point): Use it. * sweeprolog-tests.el (cap-flag-name): New test. * sweep.texi (Code Completion): Update.

[Oct 22 2023]

completion.

  • sweeprolog-tests.el: Test it.

[Oct 7 2023]

  • ENHANCED: Improve 'sweeprolog-extract-region-to-predicate' Teach 'sweeprolog-extract-region-to-predicate' about existentially quantified goals and lambda terms.

[Sep 20 2023]

  • ADDED: new command 'sweeprolog-query-replace-term' This patch extends the Term Search infrastructure to support search-and-replace operations. Namely, we replace the predicate 'sweep_term_search/2' with a new predicate 'sweep_term_replace/2' that subsumes the functionality of the former. The command 'sweeprolog-term-search' is greatly simplified and adjusted to work with this new predicate, and we introduce a new command, 'sweeprolog-query-replace-term', that exposes the new search-and-replace facility of 'sweep_term_replace/2' in an interactive UI inspired by 'query-replace'.
    • sweep.pl (sweep_term_search/2): Remove in favor of... (sweep_term_replace/2): New predicate.
    • sweeprolog.el: (sweeprolog-term-replace-edits): New function. (sweeprolog-term-search): Rewrite. (sweeprolog-term-search-last-search) (sweeprolog-term-search-overlays) (sweeprolog-term-search-repeat-count) (sweeprolog-term-search-repeat-backward) (sweeprolog-term-search-repeat-forward) (sweeprolog-term-search-abort) (sweeprolog-term-search-in-buffer) (sweeprolog-term-search-next) (sweeprolog-term-search-map): Remove, unused. (sweeprolog-query-replace-term): New command. (sweeprolog-mode-map): Bind it.
    • sweeprolog-tests.el (term-search)
    • sweep.texi (Term Search): Adjust. (Term Replace): New section.

[Sep 14 2023]

  • ENHANCED: Support pty top-level communication instead of TCP Add the ability for top-level buffers to communicate with their backing threads via pty instead of a local TCP connection. This is controlled by a new user option, enabled by default on systems where Emacs can creates a pty.
    • sweep.pl (sweep_top_level_start_pty/2): New predicate.
    • sweeprolog.el (sweeprolog-top-level-use-pty): New user option. (sweeprolog-top-level-buffer): Use it.
    • sweep.texi (The Prolog Top-level): Document it.

[Sep 8 2023]

  • ADDED: New command 'sweeprolog-extract-region-to-predicate' Add a command for extracting a part of a clause body into a separate predicate.
    • sweep.pl (sweep_term_variable_names/2) (sweep_goal_may_cut/2): New helper predicates.
    • sweeprolog.el (sweeprolog-extract-region-to-predicate): New command. (sweeprolog-maybe-extract-region-to-predicate): New function. (sweeprolog-insert-term-functions): Add it.
    • sweep.texi (Insert Term DWIM, Extract Goal): Document it.

[Sep 1 2023]

  • PORT: MSVC Need to get DLL linkage correct. This also requires a change in SWI-Prolog.h
  • PORT: Include local copy of emacs-module.h in case this is not provided.

[Aug 11 2023]

  • PORT: Explicitly export the symbols we need By default, plugins are now compiled with hidden visibility for internal symbols.

[Jun 23 2023]

  • MODIFIED: Replace "faces styles" with a theme emulating PceEmacs This adds a custom theme called 'sweeprolog-pce' that mimics the highlighting of SWI-Prolog's built-in editor, PceEmacs. It obsoletes the "faces styles" feature that Sweep provided thus far. For backward compatibility, The user option 'sweeprolog-faces-style' is retained and mostly still respected.

    Thanks to Stefan Monnier for suggesting this approach for simplifying Sweep's code and making it more conformant with Emacs conventions.

    • sweeprolog-pce-theme.el: New file.
    • sweeprolog.el: Remove 'sweeprolog-defface' macro its 'sweeprolog-*-face' functions, use plain face definitions and refer to them directly by their names instead. Also extend 'custom-theme-load-path' to include the new sweeprolog-pce-theme.el.
    • README.org (Semantic Highlighting): Replace "Available Styles" subsection with new subsection "PceEmacs Theme".

[Jun 20 2023]

  • DOC: Extend the "Overview" manual section * README.org (Main Features) (Comparison with Emacs's built-in Prolog mode): New subsections.

[Jun 18 2023]

  • ADDED: Persistent history for Sweep top-levels This adds a new user option that controls the value of 'comint-input-ring-file-name' in Sweep top-level buffers.
    • sweeprolog.el (sweeprolog-top-level-persistent-history): New user option. (sweeprolog-top-level-sentinel) (sweeprolog-top-level-setup-history): New functions. (sweeprolog-top-level-setup-buffer): Call 'sweeprolog-top-level-setup-history' when creating a new top-level buffer.

[Jun 14 2023]

  • FIXED: Correctly recognize DCG grammar rules in 'C-c C-d' * sweeprolog.el (sweeprolog-beginning-of-predicate-at-point): Also return the module and neck operator of the predicate at point. (sweeprolog-insert-predicate-documentation) (sweeprolog-read-predicate-documentation-function) (sweeprolog-read-predicate-documentation-with-holes) (sweeprolog-read-predicate-documentation-default-function) (sweeprolog-read-predicate-documentation) (sweeprolog-document-predicate-at-point): Adapt to support DCGs and non-local predicates.

[Jun 11 2023]

  • ENHANCED: Guess argument names for DCG grammar rules * sweeprolog.el (sweeprolog-predicate-completion-at-point) (sweeprolog-insert-clause): Support guessing argument names from documentation also for DCG grammar rules.
  • ENHANCED: Also highlight "undefined" head terms
  • ENHANCED: 'sweeprolog-find-predicate/module' improvements Allow finding modules and predicates in another window with prefix argument. Also improve prompt for 'sweeprolog-find-predicate'.
    • sweeprolog.el (sweeprolog-read-predicate-prompt): Remove trailing colon and space. (sweeprolog-predicate-visible-p-function): New user option. (sweeprolog-read-predicate): Use it, and format PROMPT with predicate at point as the default argument. (sweeprolog-find-module) (sweeprolog-find-predicate): Add optional argument OTHER-WINDOW. (sweeprolog-describe-predicate): Adapt PROMPT argument passed to 'sweeprolog-read-predicate'.
    • README.org (Finding Prolog Code): Expand.

[Jun 8 2023]

  • ENHANCED: Improve DCG support Take into account DCG grammar rules and ensure they're supported all around. Crucially, allow 'sweeprolog-describe-predicate' to display documentation for DCG grammar rules.
  • FIXED: Don't change hooks globally * sweeprolog.el (sweeprolog-mode): Extend 'kill-buffer-hook' and 'context-menu-functions' locally rather than global.

[Jun 6 2023]

  • ENHANCED: Add tooltip info for string-stye DCG terminals
  • ENHANCED: Export DCG non-terminals as 'foo//N', not 'foo/N+2' * sweep.pl (strip_det/2): Handle DCG non-terminals with determinism specification. (sweep_local_predicate_export_comment/2, sweep_exportable_predicates/2) * sweeprolog.el (sweeprolog-local-export-comment) (sweeprolog-local-export-comment): Adapt for DCG non-terminals.
  • ENHANCED: Highlight string-style DCG terminals

[Jun 1 2023]

  • ADDED: highlighting and tooltip info for declaration options * sweep.pl (sweep_color_normalized_/4): Handle 'decl_option/1' fragments.
    • sweeprolog.el (sweeprolog-declaration-option): New face, used in... (sweeprolog-analyze-fragment-to-faces): ...for 'decl_option' frags. (sweeprolog--help-echo-for-declaration-option): New function. (sweeprolog-analyze-fragment-help-echo): Use it.

[May 30 2023]

  • ADDED: command for inserting example usage comments * sweeprolog.el (sweeprolog-top-level-example-mode): New minor mode. (sweeprolog-make-example-usage-comment): New command. (sweeprolog-mode-map): Bind it.
    • README.org (Example Usage Comments): New section.

[May 26 2023]

  • ADDED: New command for expanding macros * sweep.pl (sweep_expand_macro/2): New predicate. * sweeprolog.el (sweeprolog-expand-macro-at-pos): New function. (sweeprolog-expand-macro-at-point): New command. (sweeprolog-context-menu-functions): Add... (sweeprolog-context-menu-for-macro): New function. * README.org (Macro Expansion): New section.
  • ADDED: Highlighting and tooltip info for macros * sweep.pl (sweep_color_normalized_/4): Handle 'macro(String)' terms. * sweeprolog.el (sweeprolog-macro): New face. (sweeprolog-analyze-fragment-to-faces) (sweeprolog-analyze-fragment-help-echo): Handle 'macro' fragments.
  • FIXED: tokenizing adjacent operators Make Sweep's Prolog tokenization functions more careful in their handling of unrelated adjacent operators. This fixes an issue that affects term-based movement commands and other commands that rely on 'sweeprolog--forward-sexp' and friends.
    • sweeprolog.el (sweeprolog-next-token-boundaries) (sweeprolog-last-token-boundaries): Fix handling of adjacent (distinct) operators.
    • sweeprolog-tests.el (forward-sexp-with-adjacent-operators): New test case.

[May 24 2023]

  • MODIFIED: Remove '-face' suffix from face names Remove the '-face' suffix from the names of all defined faces as prescribed in (info "(elisp)Defining Faces").

[May 20 2023]

  • ENHANCED: faster completion-at-point for predicates Filter predicate completion candidates according to the text near point before formatting and computing argument names. This makes completion-at-point for predicates much faster when there are lots of known predicates.

[Feb 16 2023]

  • FIXED: beginning-of-clause detection with quoted head functors * sweeprolog.el (sweeprolog-beginning-of-top-term): don't skip quoted functors in clause heads.
  • ADDED: Support setting breakpoints in sweeprolog-mode * sweep.pl (sweep_set_breakpoint/2) (sweep_delete_breakpoint/2) (sweep_set_breakpoint_condition/2): new predicates.
    • sweeprolog.el (sweeprolog-dependency-directive): update package-version field. (sweeprolog-set-breakpoint) (sweeprolog-set-breakpoint-condition) (sweeprolog-delete-breakpoint) (sweeprolog-list-breakpoints): new commands. (sweeprolog-highlight-breakpoints): new user option. (sweeprolog-mode-map): bind sweeprolog-set-breakpoint.
    • README.org (Setting Breakpoints): new manual section.
  • ADDED: mode line indication for loaded buffers * sweep.pl (sweep_source_file_load_time/2): new predicate. (sweep_load_buffer/2): also update source modification time based. * sweeprolog.el (sweeprolog-buffer-load-time) (sweeprolog-buffer-loaded-since-last-modification-p): new functions. (sweeprolog-load-buffer): use it. (sweeprolog-mode): add mode line indication if buffer is loaded.

[Feb 13 2023]

  • MODIFIED: sweeprolog-update-dependencies choice of directives * sweeprolog.el (sweeprolog-dependency-directive): New user option. Determines which directive to use in... (sweeprolog-update-dependencies): Fix edge cases in finding where to insert new directives. Optionally infer directive to add based on current buffer contents.
    • README.org (Managing Dependencies): Update section.

[Feb 7 2023]

  • FIXED: end-of-term detection after a fullstop turns to a dict dot This fixes an issue with finding clause bounds after changing e.g.:
    foo(Bar, Baz) :- Baz = Bar.  ^ read as fullstop

    to:

    foo(Bar, Baz) :- Baz = Bar.foo.	^ read as dict dot
  • ADDED: new commands for managing numbered variables * sweeprolog.el (sweeprolog-increment-numbered-variables) (sweeprolog-decrement-numbered-variables): new commands. (sweeprolog-mode-map): bind them to C-c C-+ and C-c C--. (sweeprolog-context-menu-for-variable): allow calling these new commands from context menus for numbered variables. * sweeprolog-tests.el: add test for incrementing numbered variables.
    • README.org (Numbered Variables): new manual section.

[Feb 4 2023]

  • ENHANCED: handle renaming variables to existing variable names * sweeprolog.el (sweeprolog-rename-variable-allow-existing): new user option, used by... (sweeprolog-read-new-variable-try): new command, exists the minibuffer if it contains a valid variable name. It checks if the selected variable name already exists. Used by... (sweeprolog-read-new-variable): new function, reads a Prolog variable name in the minibuffer with a dedicated exit command. (sweeprolog-rename-variable): use it.

[Feb 1 2023]

  • ENHANCED: provide exact buffer positions for cross references * sweep.pl (reference_span/5): new predicate. (sweep_predicate_references/2): use it to find exact character offset of predicate references. * sweeprolog.el (xref-backend-references): adapt accordingly.

[Jan 29 2023]

  • ADDED: command for renaming a variable in Prolog term * sweeprolog.el (sweeprolog-rename-variable): new command. (sweeprolog-context-menu-rename-variable): new command used in context menus for variables. (sweeprolog-context-menu-for-variable): new function, used in... (sweeprolog-context-menu-functions): add it to the list. (sweeprolog-mode-map): bind it to C-c C-r. * README.org (Renaming Variables): new section.

[Jan 28 2023]

[Jan 26 2023]

  • ADDED: numeric argument for sweeprolog-forward/backward-hole
    • sweeprolog.el (sweeprolog-count-holes): new command, counts holes in the current buffer. (sweeprolog-forward-hole, sweeprolog-backward-hole): new numeric argument, corresponding to the prefix argument when called interactively. With positive/negative numeric argument, move over that many holes. With zero numeric argument, call sweeprolog-count-holes instead.

Package table

[Aug 30 2023]

  • PORT: MSVC

Package tipc

[Aug 25 2023]

Package xpce

[Jan 28 2024]

  • PORT: Define PATH_MAX by hand if all fails.

[Dec 18 2023]

  • CLEANUP: Removed unused code.

[Dec 11 2023]

[Dec 9 2023]

  • ADDED: GUI tracer settings: allow setting ellipses length for text.

[Nov 13 2023]

  • FIXED: Huge spacing in PceEmacs on some fixed width fonts.

[Sep 2 2023]

  • FIXED: Windows possible memory corruption due to long/intptr_t mismatch

[Aug 31 2023]

  • PORT: MSVC - Avoid dependency on globbing in CMake command by using CMake file(GLOB) - Suppress compiler warnings on data loss and signed/unsigned types - Small typing cleanup. - Avoid RedrawWindow() (renamed to pceRedrawWindow()) - Fix SendFunc casting - Avoid conflict over "small"!?

[Aug 28 2023]

  • PORT: Include Win32 port of Xpm dependency This simplifies the build process. The code has been included and updated to avoid many compiler warnings.
  • PORT: C11 compatibility

[Aug 16 2023]

  • BUILD: Copy swipl-rc to home/xpce/prolog This is the only file that required running the binary without installation that was in the source. By copying it to the binary pre-stage home dir we can greatly simplify build_home.pl

[Aug 11 2023]

  • ENHANCED: Hide internal xpce symbols This avoids symbol conflicts and reduces the startup time

[Jul 15 2023]

  • FIXED: Prevent persistent changes to the Prolog stacks in the gui tracer

[May 13 2023]

  • FIXED: finder with default mode to find files for reading.

[Apr 1 2023]

  • PORT: Add function prototypes.
  • PORT: migration of regex library to ANSI C prototypes
  • PORT: Convert gitwrite.c code to ANSI C.

[Mar 26 2023]

  • FIXED: directory->scan existence checking.

[Mar 9 2023]

  • ADDED: Deal with new port option of the profiler.

[Feb 26 2023]

[Feb 14 2023]

  • FIXED: Marshall 64 bit integers from xpce to Prolog.
  • FIXED: pce->write for integers > 32 bits.

[Feb 13 2023]

  • CLEANUP: Use PRIdPTR from <inttypes.h>for printing intptr_t rather than our own creation.

[Jan 27 2023]

  • ADDED: Also bind M-j to newline_and_indent. This is not exactly the same as Emacs does, but in most cases close.

Package yaml

[Aug 30 2023]

  • PORT: MSVC

[May 4 2023]

  • FIXED: Stricter number syntax checking. The library tests scalars for numeric syntax and then invokes the Prolog parser. It passed "e" as a number. This patch also documents that, violating the standard, we parse "0." as a string rather than a float.

Package zlib

[Sep 6 2023]

  • FIXED: Predicate options declarations.