Before describing how to program using tabling it is perhaps worthwhile reviewing some of the goals of XSB
Goals 1 and 2 are addressed by XSBs engine, which in Version 2.2 is based on a memory-copying version of a virtual machine called the SLG-WAM. The overhead for SLD resolution using this machine is negligible. Thus when XSB is used simply as a Prolog system (i.e., no tabling is used), it is reasonably competitive with other Prolog implementations based on a WAM emulator written in C or assembly. For example, XSB Version 1.6 is about two to three times slower than Quintus 3.1.1 or emulated SICStus Prolog 3.1.
Goals 3, 4 and 5 have been nearly met, but there are a few instances in which interaction of tabling with a Prolog construct has been accomplished, or is perhaps impossibe. Accordingly we discuss these instances throughout this chapter. XSB is still under development however, so that future versions may support more transparent mixing of Prolog and tabled code (e.g. allowing tabled predicates in the scope of ) or adding Prolog functionality to tabled predicates (e.g. allowing non-ground negation in tnot/1).