The following examples (from "Tabling with Sound Answer Subsumption") show that greedy subsumption (which makes subsumptive tabling useful in the first place) does not preserve declarative/LFP semantics.
This first example agrees with the semantics, but only terminates because the solution set is finite:
:- table q(+). q(0). q(1). q(2) :- q(X), X = 1. q(3) :- q(X), X = 0. ?- aggregate(max(X), q(X), Max). Max = 3.
This second example doesn't agree with the semantics, because when we try to prove
p(1) has greedily subsumed
X = 0 fails.
:- table p(max). p(0). p(1). p(2) :- p(X), X = 1. p(3) :- p(X), X = 0. % This always fails. ?- p(X). X = 2. % LFP contains 3.