# General

**URL:** https://swi-prolog.discourse.group/c/general/32.md

[Latest](https://swi-prolog.discourse.group/latest.md) · [Categories](https://swi-prolog.discourse.group/categories.md) · [Tags](https://swi-prolog.discourse.group/tags.md)

---

## [About the General category](https://swi-prolog.discourse.group/t/about-the-general-category/5721)

<div class="topic-metadata">

**Author:** [@system](https://swi-prolog.discourse.group/u/system)\
**Replies:** 0

</div>

---

## [Welcome to Discourse](https://swi-prolog.discourse.group/t/welcome-to-discourse/7)

<div class="topic-metadata">

**Author:** [@system](https://swi-prolog.discourse.group/u/system)\
**Replies:** 0\
**Last updated:** [February 4, 2019, 10:56am UTC](https://swi-prolog.discourse.group/t/welcome-to-discourse/7 "2019-02-04T10:56:12Z")

</div>

Welcome to the free SWI-Prolog Discourse forum. SWI-Prolog is a comprehensive open source implementation of the Prolog programming language. This forum has categories which discuss things such as user issues (how can …

---

## [Why does call\_with\_time\_limit/2 fail to interrupt tight repeat loops with frequent I/O?](https://swi-prolog.discourse.group/t/why-does-call-with-time-limit-2-fail-to-interrupt-tight-repeat-loops-with-frequent-i-o/9858)

<div class="topic-metadata">

**Author:** [@kuniaki.mukai](https://swi-prolog.discourse.group/u/kuniaki.mukai)\
**Replies:** 10\
**Last updated:** [October 21, 2026, 6:33pm UTC](https://swi-prolog.discourse.group/t/why-does-call-with-time-limit-2-fail-to-interrupt-tight-repeat-loops-with-frequent-i-o/9858 "2026-10-21T18:33:41Z")

</div>

Hi all, I have been benchmarking several rational tree comparison predicates (including Foreign C implementations) by fuzz-testing them against transitivity: generating random terms and searching for counterexamples (X\<Y…

---

## [Thread\_get\_message/3 can spin with a pending signal during cleanup](https://swi-prolog.discourse.group/t/thread-get-message-3-can-spin-with-a-pending-signal-during-cleanup/9870)

<div class="topic-metadata">

**Author:** [@torbjorn.lager](https://swi-prolog.discourse.group/u/torbjorn.lager)\
**Replies:** 1\
**Last updated:** [October 20, 2026, 1:37pm UTC](https://swi-prolog.discourse.group/t/thread-get-message-3-can-spin-with-a-pending-signal-during-cleanup/9870 "2026-10-20T13:37:02Z")

</div>

Upstream report: zero-time thread\_get\_message/3 can spin with a pending signal during cleanup Environment SWI-Prolog 10.1.17 and 10.1.18, with version\_data = swi(10,1,17,\[\]) and swi(10,1,18,\[\]) respectively; both repor…

---

## [\[Flash Report\] Fast sorting & canonical deduplication for rational trees via C foreign predicate (tcoa\_sort/2)](https://swi-prolog.discourse.group/t/flash-report-fast-sorting-canonical-deduplication-for-rational-trees-via-c-foreign-predicate-tcoa-sort-2/9863)

<div class="topic-metadata">

**Author:** [@kuniaki.mukai](https://swi-prolog.discourse.group/u/kuniaki.mukai)\
**Replies:** 7\
**Last updated:** [October 19, 2026, 7:16pm UTC](https://swi-prolog.discourse.group/t/flash-report-fast-sorting-canonical-deduplication-for-rational-trees-via-c-foreign-predicate-tcoa-sort-2/9863 "2026-10-19T19:16:53Z")

</div>

I would like to share an experimental C-based foreign predicate, tcoa\_sort/2, designed to sort and deduplicate lists of terms (including rational trees/cyclic terms) up to bisimilarity on a 1,000,000-term scale. Approa…

---

## [Possible database update problem](https://swi-prolog.discourse.group/t/possible-database-update-problem/9862)

<div class="topic-metadata">

**Author:** [@stassa.p](https://swi-prolog.discourse.group/u/stassa.p)\
**Replies:** 3\
**Last updated:** [October 13, 2026, 12:08pm UTC](https://swi-prolog.discourse.group/t/possible-database-update-problem/9862 "2026-10-13T12:08:51Z")

</div>

I’m on the latest daily build for windows (version 10.1.18-3-gf379af528). I noticed that some times the database state is not correctly updated after I make a change to my code and call make/0. For example, I remove a c…

---

## [Tdd methology](https://swi-prolog.discourse.group/t/tdd-methology/9860)

<div class="topic-metadata">

**Author:** [@Azurian](https://swi-prolog.discourse.group/u/Azurian)\
**Replies:** 0\
**Last updated:** [October 13, 2026, 8:20am UTC](https://swi-prolog.discourse.group/t/tdd-methology/9860 "2026-10-13T08:20:48Z")

</div>

What do you think about Test Driven Developpent and more generally about Agile I think that it is Business driven and not thought driven

---

## [Other languages are different, but not that different](https://swi-prolog.discourse.group/t/other-languages-are-different-but-not-that-different/9838)

<div class="topic-metadata">

**Author:** [@mgondan1](https://swi-prolog.discourse.group/u/mgondan1)\
**Replies:** 5\
**Last updated:** [October 11, 2026, 2:36am UTC](https://swi-prolog.discourse.group/t/other-languages-are-different-but-not-that-different/9838 "2026-10-11T02:36:01Z")

</div>

I think the original quote is from O’Keefe “Prolog is different, but not that different.” Those students used to procedural/imperative languages sometimes have a hard time getting started with prolog, because it is a bi…

---

## [Writing a CSG in DCG notation](https://swi-prolog.discourse.group/t/writing-a-csg-in-dcg-notation/9857)

<div class="topic-metadata">

**Author:** [@stassa.p](https://swi-prolog.discourse.group/u/stassa.p)\
**Replies:** 5\
**Last updated:** [October 9, 2026, 10:01am UTC](https://swi-prolog.discourse.group/t/writing-a-csg-in-dcg-notation/9857 "2026-10-09T10:01:46Z")

</div>

I am trying to find a way to write the classic a^nb^nc^n Context Sensitive Grammar (CSG) from Hopcroft & Ullman in DCG notation. The book gives the productions of the grammar as follows: S \\rightarrow aSBC S \\rightarro…

---

## [Mixed info deduction](https://swi-prolog.discourse.group/t/mixed-info-deduction/9849)

<div class="topic-metadata">

**Author:** [@konokaiden](https://swi-prolog.discourse.group/u/konokaiden)\
**Replies:** 7\
**Last updated:** [October 4, 2026, 9:01pm UTC](https://swi-prolog.discourse.group/t/mixed-info-deduction/9849 "2026-10-04T21:01:51Z")

</div>

I can’t imagine a title that really describes what I’m after, so apologies for that… I’m currently working with geometric objects (for no particular reason), and I’m wondering if there’s a good way to implement the use …

---

## [Plunit and optimise](https://swi-prolog.discourse.group/t/plunit-and-optimise/9848)

<div class="topic-metadata">

**Author:** [@mike.elston](https://swi-prolog.discourse.group/u/mike.elston)\
**Replies:** 1\
**Last updated:** [October 3, 2026, 7:54am UTC](https://swi-prolog.discourse.group/t/plunit-and-optimise/9848 "2026-10-03T07:54:43Z")

</div>

With this program: :- set\_prolog\_flag(optimise, true). :- begin\_tests(foo). test(1) :- true. :- end\_tests(foo). compiling the buffer works fine (Ctrl-c Ctrl-b) but make/0 (Ctrl-c Ctrl-m) gives an error: % /home/…

---

## [Minimum MacOS requirements for SWI Prolog](https://swi-prolog.discourse.group/t/minimum-macos-requirements-for-swi-prolog/9841)

<div class="topic-metadata">

**Author:** [@ridgeworks](https://swi-prolog.discourse.group/u/ridgeworks)\
**Replies:** 9\
**Last updated:** [September 27, 2026, 3:45pm UTC](https://swi-prolog.discourse.group/t/minimum-macos-requirements-for-swi-prolog/9841 "2026-09-27T15:45:13Z")

</div>

The current development stream indicates the minimum requirements for SWIP on MacOS as: MacOSX 10.15 (Catalina) and later on x86\_64 and arm64 As tested on a desktop Intel Mac: MacOS 10.15 (Catalina) (and previous, …

---

## [Can't start SWI IDE from daily build for windows](https://swi-prolog.discourse.group/t/cant-start-swi-ide-from-daily-build-for-windows/9824)

<div class="topic-metadata">

**Author:** [@stassa.p](https://swi-prolog.discourse.group/u/stassa.p)\
**Replies:** 8\
**Last updated:** [September 22, 2026, 1:39pm UTC](https://swi-prolog.discourse.group/t/cant-start-swi-ide-from-daily-build-for-windows/9824 "2026-09-22T13:39:39Z")

</div>

As the title says: I can’t start the SWI-Prolog IDE from the daily build for windows. I tried with today’s binary (21/09/26) and the earliest available one (13/09/26) and both fail to start the IDE. More precisely, doub…

---

## [Generating SWI-Prolog code with GPT-6 Astra](https://swi-prolog.discourse.group/t/generating-swi-prolog-code-with-gpt-6-astra/9832)

<div class="topic-metadata">

**Author:** [@EricGT](https://swi-prolog.discourse.group/u/EricGT)\
**Replies:** 0\
**Last updated:** [September 22, 2026, 12:48pm UTC](https://swi-prolog.discourse.group/t/generating-swi-prolog-code-with-gpt-6-astra/9832 "2026-09-22T12:48:54Z")

</div>

In December 2025, I posted about finding that Claude Code could generate SWI-Prolog code. I’ve now had experience generating SWI-Prolog code with OpenAI’s GPT-6 Astra as well. The code I’m working with goes beyond typic…

---

## [Term\_factorized, term\_minimal, term\_automaton, automaton\_minimal](https://swi-prolog.discourse.group/t/term-factorized-term-minimal-term-automaton-automaton-minimal/9821)

<div class="topic-metadata">

**Author:** [@stassa.p](https://swi-prolog.discourse.group/u/stassa.p)\
**Replies:** 14\
**Last updated:** [September 20, 2026, 9:17pm UTC](https://swi-prolog.discourse.group/t/term-factorized-term-minimal-term-automaton-automaton-minimal/9821 "2026-09-20T21:17:35Z")

</div>

I’m looking through the documentation trying to understand the following predicates: term\_factorized/3 and term\_factorized/4 term\_minimal/2 term\_automaton/2 automaton\_minimal/2 and automaton\_minimal/3 But I have to …

---

## [Xml\_write to a zipfile](https://swi-prolog.discourse.group/t/xml-write-to-a-zipfile/9819)

<div class="topic-metadata">

**Author:** [@mgondan1](https://swi-prolog.discourse.group/u/mgondan1)\
**Replies:** 6\
**Last updated:** [September 17, 2026, 11:42am UTC](https://swi-prolog.discourse.group/t/xml-write-to-a-zipfile/9819 "2026-09-17T11:42:14Z")

</div>

I want to write an xml to a zip file, this is what I tried: zip\_open("new.zip", write, Z, \[\]), zipper\_open\_new\_file\_in\_zip(Z, "imsmanifest.xml", S, \[\]), xml\_write(S, element(elem, \[\], \[\]), \[\]), close(S), close(Z). A…

---

## [Term\_factorized/3 error for compound\_name\_arity zero term](https://swi-prolog.discourse.group/t/term-factorized-3-error-for-compound-name-arity-zero-term/9815)

<div class="topic-metadata">

**Author:** [@kuniaki.mukai](https://swi-prolog.discourse.group/u/kuniaki.mukai)\
**Replies:** 20\
**Last updated:** [September 10, 2026, 6:07pm UTC](https://swi-prolog.discourse.group/t/term-factorized-3-error-for-compound-name-arity-zero-term/9815 "2026-09-10T18:07:29Z")

</div>

I happened to find a bug (?) on compound\_name\_arity zero terms in ‘term\_facotized/3’. % ?- term\_factorized(f(q()), S, E). %@ S = f(q()), %@ E = \[\]. % ?- term\_factorized(f(q(), q()), S, E). %@ ERROR: Domain error: \`com…

---

## [Break\_hook/7](https://swi-prolog.discourse.group/t/break-hook-7/9817)

<div class="topic-metadata">

**Author:** [@mike.elston](https://swi-prolog.discourse.group/u/mike.elston)\
**Replies:** 1\
**Last updated:** [September 10, 2026, 5:25pm UTC](https://swi-prolog.discourse.group/t/break-hook-7/9817 "2026-09-10T17:25:54Z")

</div>

Playing around with breakpoints I added this hook definition and test code: prolog:break\_hook(Clause, PC, FR, BFR, Expression, Debug, Action) :- writeln(user\_error, break\_hook(Clause, PC, FR, BFR, Expression, Debug)…

---

## [Epilog console freeze on dragging scroll bar track](https://swi-prolog.discourse.group/t/epilog-console-freeze-on-dragging-scroll-bar-track/9811)

<div class="topic-metadata">

**Author:** [@BobKTMGC](https://swi-prolog.discourse.group/u/BobKTMGC)\
**Replies:** 2\
**Last updated:** [September 10, 2026, 2:19am UTC](https://swi-prolog.discourse.group/t/epilog-console-freeze-on-dragging-scroll-bar-track/9811 "2026-09-10T02:19:33Z")

</div>

Maybe you are not supposed to drag the scroll bar track, but this happens accidentally and freezes the console. SWI-Prolog 10.0.2 swipl-win.exe Windows 11 Pro 25H2 Build 26200.9168 Reproducible: Produce enough out…

---

## [Atom\_json\_dict/3 options are not as documented](https://swi-prolog.discourse.group/t/atom-json-dict-3-options-are-not-as-documented/9806)

<div class="topic-metadata">

**Author:** [@mike.elston](https://swi-prolog.discourse.group/u/mike.elston)\
**Replies:** 1\
**Last updated:** [September 1, 2026, 6:59am UTC](https://swi-prolog.discourse.group/t/atom-json-dict-3-options-are-not-as-documented/9806 "2026-09-01T06:59:09Z")

</div>

atom\_json\_dict(-Text, +JSONDict, +Options) Convert between textual representation and a JSON term represented as a dict. Options are as for json\_read/3. json\_read(+Stream, -Term, +Options) The following options are pr…

---

## [Emacs - File - Show buffer menu error](https://swi-prolog.discourse.group/t/emacs-file-show-buffer-menu-error/9802)

<div class="topic-metadata">

**Author:** [@mike.elston](https://swi-prolog.discourse.group/u/mike.elston)\
**Replies:** 1\
**Last updated:** [August 30, 2026, 12:20pm UTC](https://swi-prolog.discourse.group/t/emacs-file-show-buffer-menu-error/9802 "2026-08-30T12:20:47Z")

</div>

Welcome to SWI-Prolog (threaded, 64 bits, version 10.1.13-75-gb8d1d7413) Emacs - File - Show buffer menu 101 ?- emacs. true. \[PCE warning: \<pce\>(0xaaaae9f45420,emacs\_buffer\_menu): No implementation for: -\>icon …

---

## [Unicode NO-BREAK SPACE not normalized by normalize\_space/2](https://swi-prolog.discourse.group/t/unicode-no-break-space-not-normalized-by-normalize-space-2/9800)

<div class="topic-metadata">

**Author:** [@mike.elston](https://swi-prolog.discourse.group/u/mike.elston)\
**Replies:** 4\
**Last updated:** [August 29, 2026, 8:06pm UTC](https://swi-prolog.discourse.group/t/unicode-no-break-space-not-normalized-by-normalize-space-2/9800 "2026-08-29T20:06:36Z")

</div>

The documentation for normalize\_space/2 says: All non-empty sequences for Unicode white space characters are replaced by a single space (\\u0020) character. but atom\_codes(A, \[0x00A0\]),normalize\_space(atom(X),A). A = …

---

## [Wikipedia WASM](https://swi-prolog.discourse.group/t/wikipedia-wasm/9801)

<div class="topic-metadata">

**Author:** [@wlodr](https://swi-prolog.discourse.group/u/wlodr)\
**Replies:** 0\
**Last updated:** [August 29, 2026, 9:15am UTC](https://swi-prolog.discourse.group/t/wikipedia-wasm/9801 "2026-08-29T09:15:36Z")

</div>

In the WASM article at Wikipedia, WebAssembly - Wikipedia, there is a list of supported programming languages. It includes Haskell and Scheme, but not Prolog. Could I suggest anyone competent to add it ?

---

## [Help with extremely large integer arithmetic](https://swi-prolog.discourse.group/t/help-with-extremely-large-integer-arithmetic/9768)

<div class="topic-metadata">

**Author:** [@PlacidPlatypus](https://swi-prolog.discourse.group/u/PlacidPlatypus)\
**Replies:** 19\
**Last updated:** [August 28, 2026, 3:39pm UTC](https://swi-prolog.discourse.group/t/help-with-extremely-large-integer-arithmetic/9768 "2026-08-28T15:39:54Z")

</div>

G’day all. For reasons that rhyme with “busy beaver”, I have been using SWI-Prolog for evaluating expressions that can involve integers which are tens of thousands of digits long. So far, with the largest expression eval…

---

## [New SDL+Cairo bindings pack](https://swi-prolog.discourse.group/t/new-sdl-cairo-bindings-pack/9794)

<div class="topic-metadata">

**Author:** [@kwon-young](https://swi-prolog.discourse.group/u/kwon-young)\
**Replies:** 3\
**Last updated:** [August 26, 2026, 12:00pm UTC](https://swi-prolog.discourse.group/t/new-sdl-cairo-bindings-pack/9794 "2026-08-26T12:00:29Z")

</div>

Hello, I’ve just finished cleaning up my SDL and Cairo bindings: GitHub - kwon-young/sdlpl: SWI-Prolog bindings to SDL · GitHub Here are main features of the bindings: true 1 to 1 bindings of SDL and Cairo API. Memor…

---

## [Installing and using third party packs in WASM swipl](https://swi-prolog.discourse.group/t/installing-and-using-third-party-packs-in-wasm-swipl/9107)

<div class="topic-metadata">

**Author:** [@meditans](https://swi-prolog.discourse.group/u/meditans)\
**Replies:** 10\
**Last updated:** [August 25, 2026, 11:13am UTC](https://swi-prolog.discourse.group/t/installing-and-using-third-party-packs-in-wasm-swipl/9107 "2026-08-25T11:13:00Z")

</div>

As the title says, I didn’t find a way to install and use a third party pack while using WASM swipl. Can this be done?

---

## [SWI-Prolog MCP server and service - Reply # 02](https://swi-prolog.discourse.group/t/swi-prolog-mcp-server-and-service-reply-02/9796)

<div class="topic-metadata">

**Author:** [@EricGT](https://swi-prolog.discourse.group/u/EricGT)\
**Replies:** 0\
**Last updated:** [August 23, 2026, 9:57pm UTC](https://swi-prolog.discourse.group/t/swi-prolog-mcp-server-and-service-reply-02/9796 "2026-08-23T21:57:41Z")

</div>

I hope you are feeling much better. I think of you every day. I have finally found a project where using the SWI-Prolog MCP server could be particularly beneficial. I am developing a web-based UI and agent harness for d…

---

## [Personal notes on health, AI, and the direction of SWI-Prolog](https://swi-prolog.discourse.group/t/personal-notes-on-health-ai-and-the-direction-of-swi-prolog/9701)

<div class="topic-metadata">

**Author:** [@jan](https://swi-prolog.discourse.group/u/jan)\
**Replies:** 28\
**Last updated:** [August 23, 2026, 2:07pm UTC](https://swi-prolog.discourse.group/t/personal-notes-on-health-ai-and-the-direction-of-swi-prolog/9701 "2026-08-23T14:07:42Z")

</div>

Dear SWI-Prolog user, This is set of rather personal notes. Some users may have noticed changes in how I manage SWI-Prolog. Most recent contributions have been implemented by Claude Code and I’ve not been very activ…

---

## [Bug logging into https://www.swi-prolog.org/](https://swi-prolog.discourse.group/t/bug-logging-into-https-www-swi-prolog-org/9795)

<div class="topic-metadata">

**Author:** [@jbsiddall](https://swi-prolog.discourse.group/u/jbsiddall)\
**Replies:** 2\
**Last updated:** [August 23, 2026, 12:23pm UTC](https://swi-prolog.discourse.group/t/bug-logging-into-https-www-swi-prolog-org/9795 "2026-08-23T12:23:52Z")

</div>

Reproduce: Goto swi-prolog site Click login link in page footer click “sign in with “ + Google icon follow Google oauth until successful redirected can to swi I expected to see the normal swi page I started on, and ho…

---

## [Inspecting programs with attributed variables using clause/2](https://swi-prolog.discourse.group/t/inspecting-programs-with-attributed-variables-using-clause-2/9783)

<div class="topic-metadata">

**Author:** [@stassa.p](https://swi-prolog.discourse.group/u/stassa.p)\
**Replies:** 54\
**Last updated:** [August 22, 2026, 2:16pm UTC](https://swi-prolog.discourse.group/t/inspecting-programs-with-attributed-variables-using-clause-2/9783 "2026-08-22T14:16:43Z")

</div>

I have this code that uses library(clpBNR): edge(T, A, B) :- seg(A1, B1), point(A,PA), point(B,PB), dist(A1, PA, T), dist(B1, PB, T). dist(p(X1, Y1), p(X2, Y2), D) :- % clpBNR co…

[Next page](https://swi-prolog.discourse.group/c/general/32.md?page=1)
