# \#tabling

**URL:** https://swi-prolog.discourse.group/tag/tabling/48.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)

---

## [How to get mode directed tabling from a predicate, programmatically](https://swi-prolog.discourse.group/t/how-to-get-mode-directed-tabling-from-a-predicate-programmatically/9142)

<div class="topic-metadata">

**Author:** [@meditans](https://swi-prolog.discourse.group/u/meditans)\
**Replies:** 1\
**Last updated:** [July 30, 2025, 6:40pm UTC](https://swi-prolog.discourse.group/t/how-to-get-mode-directed-tabling-from-a-predicate-programmatically/9142 "2025-07-30T18:40:23Z")

</div>

I can use predicate\_property/2 to read the tabling mode of a predicate: predicate\_property(foo(\_,\_), tabled(Flag)). But from the documentation: tabled(?Flag) True of the predicate is tabled and Flag applies. Any tab…

---

## [How to build a table in parallel](https://swi-prolog.discourse.group/t/how-to-build-a-table-in-parallel/7187)

<div class="topic-metadata">

**Author:** [@friguzzi](https://swi-prolog.discourse.group/u/friguzzi)\
**Replies:** 18\
**Last updated:** [January 29, 2024, 11:04am UTC](https://swi-prolog.discourse.group/t/how-to-build-a-table-in-parallel/7187 "2024-01-29T11:04:15Z")

</div>

Is it possible to build a large table for a tabled predicate using multiple threads?

---

## [Longest path problems and tabling](https://swi-prolog.discourse.group/t/longest-path-problems-and-tabling/5858)

<div class="topic-metadata">

**Author:** [@hardmath](https://swi-prolog.discourse.group/u/hardmath)\
**Replies:** 3\
**Last updated:** [October 17, 2022, 3:01pm UTC](https://swi-prolog.discourse.group/t/longest-path-problems-and-tabling/5858 "2022-10-17T15:01:38Z")

</div>

I’m coding a dynamic programming approach to a longest path problem (in a directed acyclic graph). The vertices are naturally represented by pairs of positive integers. The edges are easy to verify but a little tricky …

---

## [Crash following an assertion failed in tabling cleanup](https://swi-prolog.discourse.group/t/crash-following-an-assertion-failed-in-tabling-cleanup/5752)

<div class="topic-metadata">

**Author:** [@morlic](https://swi-prolog.discourse.group/u/morlic)\
**Replies:** 4\
**Last updated:** [September 9, 2022, 11:10am UTC](https://swi-prolog.discourse.group/t/crash-following-an-assertion-failed-in-tabling-cleanup/5752 "2022-09-09T11:10:59Z")

</div>

I’m experiencing a crash that is hard to reproduce. In the log the crash is preceded by an Assertion failed: LD-\>tabling.component == NULL in pl-tabling.c:4910. The top of the Prolog stack is: Prolog stack: \[92\] syste…

---

## [A subtle difference between XSB and SWI-Prolog about mode directed tabling \`po(PI)\`](https://swi-prolog.discourse.group/t/a-subtle-difference-between-xsb-and-swi-prolog-about-mode-directed-tabling-po-pi/5087)

<div class="topic-metadata">

**Author:** [@chansey97](https://swi-prolog.discourse.group/u/chansey97)\
**Replies:** 1\
**Last updated:** [March 10, 2022, 9:57am UTC](https://swi-prolog.discourse.group/t/a-subtle-difference-between-xsb-and-swi-prolog-about-mode-directed-tabling-po-pi/5087 "2022-03-10T09:57:37Z")

</div>

Firstly, the document of po(PI) is confusion. po (PI) Partial Ordering . The new answer is added iff call(PI, +Old, +Answer) succeeds. For example, po('\<'/2) accumulates the largest result. In SWI-Prolog the arity (2)…

---

## [Different behavior when exporting a tabled predicate](https://swi-prolog.discourse.group/t/different-behavior-when-exporting-a-tabled-predicate/4799)

<div class="topic-metadata">

**Author:** [@brunokim](https://swi-prolog.discourse.group/u/brunokim)\
**Replies:** 6\
**Last updated:** [December 23, 2021, 7:35pm UTC](https://swi-prolog.discourse.group/t/different-behavior-when-exporting-a-tabled-predicate/4799 "2021-12-23T19:35:33Z")

</div>

I’m using: SWI-Prolog version 8.4.1 I’m writing a parser with DCGs that exhibits weird behavior, which I’m inclined to believe is a bug on tabling and/or compilation. I can reliably turn the bug on or off by exporting t…

---

## [Tabling the wolf, sheep, cabbage](https://swi-prolog.discourse.group/t/tabling-the-wolf-sheep-cabbage/1893)

<div class="topic-metadata">

**Author:** [@anniepoo](https://swi-prolog.discourse.group/u/anniepoo)\
**Replies:** 23\
**Last updated:** [July 30, 2021, 3:35pm UTC](https://swi-prolog.discourse.group/t/tabling-the-wolf-sheep-cabbage/1893 "2021-07-30T15:35:14Z")

</div>

Here’s my attempt to write wolf-sheep-cabbage using tabling. It fails under 8.1.14 What am I doing wrong? it’s pure afaik? :- module(wsc, \[go/1\]). go(Moves) :- wsc(0,0,0,0, Moves). :- table wsc/5. wsc(1,1,1,1, \[…

---

## [Monotonic tabling without actual dynamic predicate asserts?](https://swi-prolog.discourse.group/t/monotonic-tabling-without-actual-dynamic-predicate-asserts/3915)

<div class="topic-metadata">

**Author:** [@likelion](https://swi-prolog.discourse.group/u/likelion)\
**Replies:** 11\
**Last updated:** [May 8, 2021, 8:15pm UTC](https://swi-prolog.discourse.group/t/monotonic-tabling-without-actual-dynamic-predicate-asserts/3915 "2021-05-08T20:15:37Z")

</div>

Let’s say I have an external system that provides information to my Prolog program. I can both query that system by making a request to it via dedicated predicate, or that system can push a message when new information i…

---

## [Tabling changes order of solutions - Expected?](https://swi-prolog.discourse.group/t/tabling-changes-order-of-solutions-expected/3602)

<div class="topic-metadata">

**Author:** [@dtonhofer](https://swi-prolog.discourse.group/u/dtonhofer)\
**Replies:** 2\
**Last updated:** [February 13, 2021, 12:54pm UTC](https://swi-prolog.discourse.group/t/tabling-changes-order-of-solutions-expected/3602 "2021-02-13T12:54:25Z")

</div>

As simple generator for states: based on an inductive definition. A state is a sequence of 5 numbers between 1 and 5. We represent it with an SWI-Prolog dict (dicts are really handy): s{pos0:V0,pos1:V1,pos2:V2,pos3:V3…

---

## [What does 'without function symbols' mean?](https://swi-prolog.discourse.group/t/what-does-without-function-symbols-mean/3214)

<div class="topic-metadata">

**Author:** [@anniepoo](https://swi-prolog.discourse.group/u/anniepoo)\
**Replies:** 3\
**Last updated:** [November 3, 2020, 2:12pm UTC](https://swi-prolog.discourse.group/t/what-does-without-function-symbols-mean/3214 "2020-11-03T14:12:45Z")

</div>

This from a David Warren book: All programs without function symbols are terminating, and many simple programs now have a natural programmers’ semantics. I don’t know Datalog, I know that this is one of the things y…
