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

SWI-Prolog Changelog from version 8.5.20 to 9.1.0

[Nov 24 2022]

  • DOC: Fixed LaTeX issues blocking the generation of the PDF manual.
  • TEST: Avoid name conflict between two tests to make test_installation/0 work again.
  • ENHANCED: library(main) to delay looking for tspy/1 or gspy/1 until the option is activated.
  • FIXED: Make X11 event dispatching work in single threaded version.
  • TEST: Avoid testing stuff that requires threads in the single threaded version.
  • CLEANUP: Do not compile code required for multi-threaded loading in the single threaded version.

[Nov 23 2022]

  • DOC: format/1-3: document behavior of `~0f`.
  • CONFIG: Do not install thread libraries for single threaded version.
  • MODIFIED: When ISO mode is enabled, unknown options are result in a domain error. This now also holds if the option argument is a dict.
  • MODIFIED: Ssprintf() and Ssnprintf() functions now use UTF-8 encoding (used to be ISO Latin 1), so they can handle Unicode.
  • ENHANCED: Use xref_source/2 for fetching PlDoc comments from loaded sources. Patch by @swi.
  • PORT: Provide backtrace with line numbers on MacOS using atos as replacement for addr2line.

[Nov 21 2022]

[Nov 19 2022]

  • PORT: More integer passing problems over vararg functions.
  • FIXED: Prolog flag pid on some 64 bit platforms.
  • PORT: Use CMake to test for <threads.h> support.
  • MAINTENANCE: Provide a Prolog flag asan when the system is compiled with AddressSanitizer.

[Nov 16 2022]

  • INSTALL: When using -DSWIPL_INSTALL_IN_LIB, make sure that the CMake export files can be relocated.

[Nov 14 2022]

  • WASM: Avoid undefined HTMLCollection.toList(). Emacs whitespace update
  • MODIFIED: pack_install/1 and friends to pass all environment variables to the tools that may be executed to build the pack.
  • PORT: Issue#1070: pack_install/1: Pass PKG_CONFIG_PATH to build tools

[Nov 13 2022]

  • FIXED: format/2,3: manage proper arithmetic environment for expressions.

[Nov 9 2022]

  • PORT: Make LibBF code compile for Clang

[Nov 8 2022]

  • FIXED: fetch/restore of Mersenne Twister random state. Also reduced the size of the state.
  • MODIFIED: **/2 and ^/2: If the power can be done using rational arithmetic but the numbers are too big, make the behaviour depend on max_rational_size_action. When float, try to continue after float conversion, else raise a resource error.
  • FIXED: **/2 and ^/2 overflow checking when computing the power of two rational numbers.

[Nov 7 2022]

  • ENHANCED: Prefer mpz_sgn() over mpz_cmp_ui() to 0.
  • ENHANCED: Key generation for bignum and rational clause indexing

[Nov 4 2022]

  • ADDED: BF_FTOA_PL_QUIRKS for correct float formatting.

[Nov 3 2022]

  • MODIFIED: CMake target_link_swipl() now removes the lib prefix.
  • PORT: Updated MacOS dependencies
  • FIXED: swipl.cmake outside pack_rebuild/2 context gets linking against libswipl wrong.

[Oct 30 2022]

  • FIXED: Issue#163: -s and -l files were loaded before the argv Prolog flag is cleaned.

[Oct 26 2022]

  • ADDED: prolog_walk_code/1: option walk_meta_predicates(+Boolean) to prevent the code walker from considering meta-predicates. There are few cases where this is interesting, but it was needed for constructing a s(CASP) dependency graph.

[Oct 24 2022]

  • DOC: Document (part of) the PL_cvt_i_*() functions and improve documentation for several of the PL_get_*() and PL_get_*_ex() functions.

[Oct 22 2022]

  • ADDED: PL_get_bool() now also accepts the integers (0,1)

[Oct 21 2022]

  • PORT: set RPATH correctly on MacOS for native libs in packages

[Oct 19 2022]

  • ADDED: PL_cvt_i_llong() PL_cvt_i_ulong() and PL_cvt_i_bool(). This completes the types supported by these functions.

[Oct 20 2022]

  • ADDED: listing/1,2 to also accept a clause reference as entity to list.

Package clib

[Nov 23 2022]

  • TEST: Disable tests that require threads on the single threaded version.

Package cpp

[Nov 22 2022]

  • TEST: Fixed C interface PL_scan_options() tests.

[Oct 20 2022]

  • TEST: Renamed foreign function test module to test_ffi. This avoids a conflict (and confusion) with the ffi pack to run the tests interactively.

[Oct 18 2022]

  • TEST: Added PL_scan_options example

Package http

[Nov 23 2022]

  • CONFIG: Reorganise installation and docs to distinguish core part we always want, the HTTP client and HTTP server libraries.

Package odbc

[Nov 23 2022]

  • PORT: Allow compiling in single threaded mode.

Package pldoc

[Nov 23 2022]

  • CONFIG: Make most of PlDoc work in the single threaded version.
  • CONFIG: Make PlDoc work if the HTTP server components are not part of the configuration.

[Nov 20 2022]

  • ENHANCED: Source button to prefer loaded code over xref data.

Package semweb

[Nov 21 2022]

  • FIXED: rdfa.pl: Avoid dependency oin development tools

Package ssl

[Nov 23 2022]

  • TEST: Drop tests when single threaded.

Package sweep

[Nov 23 2022]

  • ADDED: PlUnit tests block skeleton and command for inserting it * sweeprolog.el (sweeprolog-format-string-as-atom): new function. (sweeprolog-module-header-skeleton): use define-skeleton, making it a command instead of a defconst. (sweeprolog-plunit-testset-skeleton): new skeleton and command. * sweeprolog-tests: test it. * README.org ("Writing Tests"): new section. ("Using templates for creating new modules"): rename to "Creating New Modules".
  • FIXED: instantiation error in color term normalization

[Nov 22 2022]

  • FIXED: sweeprolog-beginning-of-next-top-term: other possible loop * sweeprolog.el (sweeprolog-beginning-of-next-top-term): don't loop when called in the last term of the buffer * sweeprolog-tests.el (beginning-of-next-top-term-at-last-clause): new test case
  • FIXED: possible infinite loop looking for next term * sweeprolog.el (sweeprolog-beginning-of-next-top-term): handle comments more reliably

[Nov 19 2022]

  • FIXED: exporting predicates in presence of exported operators * sweep.pl (sweep_exportable_predicates/2): new predicate. * sweeprolog.el (sweeprolog--module-term) (sweeprolog--exportable-predicates) (sweeprolog-analyze-start-exportable) (sweeprolog-analyze-fragment-exportable): no longer used, deleted. (sweeprolog-exportable-predicates): new function. (sweeprolog-read-exportable-predicate): use it. (sweeprolog-export-predicate): handle exported operators.

[Nov 18 2022]

  • ENHANCED: allow sweeprolog-forward-hole to wrap around * sweeprolog.el (sweeprolog--next-hole, sweeprolog--previous-hole): new functions. (sweeprolog--forward-hole, sweeprolog--backward-hole): add WRAP arg.

[Nov 17 2022]

  • ENHANCED: conditional syntax error highlighting

[Nov 16 2022]

  • DOC: mention sweeprolog-swipl-path in the manual

[Nov 14 2022]

  • ADDED: minor mode for automatic whitespace insertion * sweep.pl (sweep_context_callable/2): only consider the context to be callable if a neck is present up the tree, i.e. not in the head.
    • sweeprolog.el (sweeprolog-context-callable-p): new function, extracted from (sweeprolog-predicate-completion-at-point) (sweeprolog-electric-layout-post-self-insert-function): new function. (sweeprolog-electric-layout-mode): new minor mode.

[Nov 12 2022]

  • ENHANCED: revise predicate completion at point Completion at point now detects whether predicate completion is appropriate, by parsing Prolog code back from point to determine the context of point. If predicate completion is not appropriate, fallback to atom completion.

[Nov 11 2022]

  • ADDED: user option specifying where to define new predicates
    • sweeprolog.el (sweeprolog-default-new-predicate-location) (sweeprolog-new-predicate-location-above-current): new functions. (sweeprolog-new-predicate-location-function): new user option. (sweeprolog-maybe-define-predicate): use it.

[Nov 10 2022]

  • FIXED: possible error in sweeprolog-describe-predicate
  • DOC: document sweeprolog-xref-project-source-files in the manual
  • ADDED: new command sweeprolog-xref-project-source-files
  • FIXED: find user predicate definitions more reliably

[Nov 9 2022]

  • TEST: add test for updating syntax error faces
  • FIXED: clear syntax error face after fix more aggressively
  • FIXED: properly update query highlighting in the toplevel
  • FIXED: simplify & make variable highlighting more reliable

[Nov 8 2022]

  • FIXED: only consider backslash as an escape inside strings

[Nov 7 2022]

  • FIXED: restrict variable underlining to current clause
  • FIXED: variable name completion on Emacs 27 * sweeprolog.el (sweeprolog-variable-completion-at-point): don't rely on char-uppercase-p * sweeprolog-tests.el (complete-variable): new test.
  • ADDED: sweeprolog-forward/backward/mark-predicate

[Nov 5 2022]

  • REFACTOR: Simplify and deduplicate code all around * sweeprolog.el (sweeprolog-colourise-*): rename to sweeprolog-analyze-*

[Oct 28 2022]

  • FIXED: correctly recognize "public" head terms
  • TEST: add two test cases
  • FIXED: sweeprolog-identifier-at-point could return unbound module

[Nov 3 2022]

[Oct 25 2022]

  • DOC: added section "Code Completion" to the manual
  • ADDED: completion-at-point for variable names * sweeprolog.el (sweeprolog-local-variables-collection, sweeprolog-variable-completion-at-point): new functions. (sweeprolog-mode): add to completion-at-point-functions. (sweeprolog-mode-syntax-table): update according to char_type(Char, prolog_symbol).

[Oct 22 2022]

  • ADDED: context-based command for inserting new clauses or terms * sweeprolog.el (sweeprolog--forward-hole, sweeprolog--backward-hole): new functions. (sweeprolog-forward-hole): new command. (sweeprolog-end-of-predicate-definition,sweeprolog-insert-clause, sweeprolog-maybe-insert-next-clause, sweeprolog-maybe-define-predicate): new functions. (sweeprolog-insert-term-functions): new hook. (sweeprolog-insert-term-dwim): new command. (sweeprolog-mode-map): bind new commands. * sweeprolog-tests.el (dwim-define-predicate): new test case. * README.org (Context-Based Term Insertion): new section.
  • ENHANCED: render refs to Prolog library in help buffers * sweeprolog.el (sweeprolog-render-html-a): recognize and render references to Prolog library files.

[Oct 21 2022]

  • FIXED: handling of operators as predicate completion candidates
  • FIXED: don't include irrelevant candidates in apropos results * sweep.pl (sweep_predicate_apropos/2): filter candidates by minimum match quality.
  • ENHANCED: add predicate properties list in help buffers * sweep.pl (sweep_predicate_properties/2): new predicate. * sweeprolog.el (sweeprolog--render-predicate-properties): new function. (sweeprolog--describe-predicate): use it.

[Oct 20 2022]

  • ENHANCED: load and initialize sweep-module just-in-time Instead of loading sweep-module and initializing Prolog as part of loading sweeprolog.el (subject to the user option sweeprolog-init-on-load), this commit introduces just-in-time loading and initialization of Prolog. Suggested by Stefan Monnier.
    • sweeprolog.el: (sweeprolog--open-query): new function, wraps sweeprolog-open-query and initializes Prolog on the first call. Used in place of sweeprolog-open-query throughout. (sweeprolog-init-on-load): make variable obsolete.

[Oct 19 2022]

  • ENHANCED: teach sweep to jump to C code for built-in predicates
    • sweeprolog.el: - sweeprolog-swipl-sources: new user option.
    • sweeprolog-native-predicate-location: new function. - sweeprolog-predicate-location: use it. - README.org: Built-in Native Predicates: new section.

Package swipl-win

[Nov 23 2022]

  • FIXED: Check return codes of many operations on lists.

[Jul 22 2022]

  • PORT: Changes for SWI-cpp.h API Version 2

Package windows

[Oct 26 2022]

Package xpce

[Nov 23 2022]

  • CONFIG: Avoid dependency on threads.

[Oct 29 2022]

Package zlib

[Nov 23 2022]

  • TEST: Disable tests that requires threads