next up previous contents index
Next: 6. Standard Predicates Up: 5.5 Incremental Table Maintenance Previous: 5.5.2 Predicates for Incremental   Contents   Index

5.5.3 Shorthand for Complex Table and Dynamic Declarations

We have a number of variations to how predicates can be tabled in XSB: subsumptive, variant, incremental, opaque, dynamic, private, and shared. We also have variations in forms of dynamic predicates: tabled, incremental, private, and shared. We extend the table and dynamic compiler directives with modifiers that allow users to indicate the kind of tabled or dynamic predicate they want. For example,

:- table p/3,s/1 as subsumptive,private.

:- table q/3 as incremental,variant.

:- dynamic r/2,t/1 as incremental.

The first example above would be equivalent to:

:- table p/3,s/1.
:- use_subsumptive_tabling p/3,s/1.
:- thread_private p/3,s/1.

The modifiers available for the table compiler directive are subsumptive, variant, (dynamic) or dyn, incremental, opaque, private, and shared. Not all combinations are meaningful. The modifiers available for the dynamic compiler directive are tabled, incremental, private, shared. Again not all combinations are meaningful. We note that

:- table p/3 as dyn.
and
:- dynamic p/3 as tabled.
are equivalent.



Terrance Swift 2007-10-05