Tabling: First Blood

Hello,

I want to integrate the use of tabling in my program. As a first step, I tried to run the example program shown in Incremental Tabling:

:- table (p/1, q/1) as incremental.
:- dynamic([d/1], [incremental(true)]).
p(X) :- q(X).
q(X) :- d(X), X < 10.
d(1).

and I got this:
ERROR: ...
Domain error: tabled_mode’ expected, found p/1,q/1'

I am running version 8.0.3 on Windows. What is the problem?

Many thanks.

Quick guess.

Tabling has been being added over the last several releases and you are not up to the latest which is SWI-Prolog 8.1.19

The latest stable release is 8.0.3-1. I will try the latest development release. Thanks.

1 Like