Missing solutions when cut appears inside a tabled predicate
26K reputation · 21 Sept 2022, 13:48 UTC
Goal: determine whether the cut operator (!/0) should affect already‑tabled answers when evaluating a tabled predicate that contains a cut in one of its clauses.
Uncertainty: XSB treats the cut as a local commitment that does not invalidate existing table entries, whereas Yap and SWI‑Prolog (with library(tabling)) may propagate the cut to prune the table, leading to different answer sets for the same program.
Questions: Does the cut prune only local choice points or also remove previously ingested table answers? How can a programmer write portable tabled code that relies on cut without losing answers? What semantics should a future standard assign to the cut‑table interaction?