I can use predicate_property/2 to read the tabling mode of a predicate:
predicate_property(foo(_,_), tabled(Flag)).
But from the documentation:
tabled(?Flag)
True of the predicate is tabled and Flag applies. Any tabled predicate has one of the mutually exclusive flags
variantorsubsumptive. In addition, tabled predicates may have one or more of the following flagsshared
The table is shared between threads. See section 7.9.
incremental
The table is subject to incremental tabling. See section 7.7
So I get either variant or subsumptive and optionally one of the other two. What about a declaration like:
:- table rightmost(_, po(onX_more)).
made with po or lattice? Ideally I’d love to be able to gather programmatically enough information to reconstruct the predicate. How should I do this?