:-table p(M1,...,Mn):C.declares that up to C answers to p/n are selectively tabled based on the mode, where Mi can be min, max, + (input), or - (output). Only input arguments participate in variant testing, and only one argument can be minimized or maximized. An optimized argument is not required to be numeric, and can be any term.