observe_call(+Index,
+Head, :Wrapped)Wrapper body. The ancestor stack is kept in the backtrackable global
variable auto_table_stack as a term
s(Depth, Index, HeadCopy, Parent, Frame) or [],
where Frame is the frame that runs the ancestor. The learning state is
in the global variable auto_table_learn. We must access it
using
nb_getval/2 such that
we can update it destructively.
A loop that passes a barrier for suspending a tabled goal, such as
findall/3, cannot
be broken by tabling. It is recorded separately (see shift_barrier/2).