# Incremental Tabling

**URL:** <https://swi-prolog.discourse.group/t/incremental-tabling/1163>\
**Category:** Split Topic\
**Created:** [July 17, 2019, 3:09pm UTC](https://swi-prolog.discourse.group/t/incremental-tabling/1163 "2019-07-17T15:09:56Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![peter.ludemann](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/peter.ludemann/32/48_2.png) [@peter.ludemann](https://swi-prolog.discourse.group/u/peter.ludemann)\
**Post date:** [July 22, 2019, 5:13pm UTC](https://swi-prolog.discourse.group/t/incremental-tabling/1163/15 "2019-07-22T17:13:06Z")

</div>

> [@Why It's Worth It](https://swi-prolog.discourse.group/t/why-its-worth-it/962/12):
>
> Could this be long ago before _answer subsumption_ (aka _mode directed tabling_ ) was added?

I’m pretty sure that was available (XSB version 3.7?). (But this was 5+ years ago; memories fade and I don’t have access to the code or emails I wrote then … I suppose I could ask David Warren if he remembers …)

> [@Why It's Worth It](https://swi-prolog.discourse.group/t/why-its-worth-it/962/12):
>
> you can find the actual shortest path and even all _acyclic_ paths

I would love to see a program that finds all acyclic paths and not just the shortest. The problem I encountered was that one of my arguments was building the list of visited nodes, and there didn’t seem to be any way to “subsume” these, which would have allowed terminating the computation. The only alternative would seem to be recording the visited nodes, e.g. with `b_setval/2`, which I don’t think XSB had. But using globals is something I’d prefer to avoid.

(It’s also possible XSB version 3.8 has added some features that would solve the problem.)

---

_[View the full topic](https://swi-prolog.discourse.group/t/incremental-tabling/1163)._
