Tabling¶
YAPTab* is the tabling engine that extends YAP's execution model to support tabled evaluation for definite programs.
YAPTab was implemented by Ricardo Rocha and its implementation is largely based on the ground-breaking design of the XSB Prolog system, which implements the SLG-WAM. Tables are implemented using tries and YAPTab supports the dynamic intermixing of batched scheduling and local scheduling at the subgoal level. Currently, the following restrictions are of note:
-
YAPTab does not handle tabled predicates with loops through negation (undefined behaviour).
-
YAPTab does not handle tabled predicates with cuts (undefined behaviour).
-
YAPTab does not support coroutining (configure error).
-
YAPTab does not support tabling dynamic predicates (permission error).
To experiment with YAPTab use --enable-tabling
in the configure script or add -DTABLING
to YAP_EXTRAS
in the system's Makefile
. We next describe the set of built-ins predicates designed to interact with YAPTab and control tabled execution: