I have a relatively complex use of answer subsumption (using
subsumes/2) for a transitive predicate whose base cases are defined by a dynamic predicate whose clauses are asserted through an abstract interpretation of a large-ish program (phew!).
Anyway, I need to backtrack through several answers to this tabled query, and for some reason it triggers an issue where I get an existence error for
usermod:once/1. I see that
once is defined away by metaprogramming, but evidently that metaprogramming isn't (always?) given a chance to work on the code generated in
cp_opt.P. So I changed the call to
(G,!) and things work as I expected.
I think the "correct" fix would be to ensure that all the term expansions, etc apply to the code generated by
cp_opt.P in all cases, but this fixes the bad behavior at least.